diff --git a/.github/.test/samples.json b/.github/.test/samples.json index 4683eb01986..6a157556aae 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -134,7 +134,7 @@ ] }, { - "input": "csharp-refactor-petstore.sh", + "input": "csharp-netcore-petstore.sh", "matches": [ "Client: C-Sharp" ] @@ -218,7 +218,7 @@ ] }, { - "input": "finch-petstore-server.sh", + "input": "scala-finch-petstore-server.sh", "matches": [ "Server: Scala" ] @@ -260,7 +260,7 @@ ] }, { - "input": "graphql-server-petstore.sh", + "input": "graphql-nodejs-express-server.sh", "matches": [ "Server: GraphQL" ] @@ -825,13 +825,13 @@ ] }, { - "input": "python-flask-petstore-python2.sh", + "input": "python-server-flask-petstore-python2.sh", "matches": [ "Server: Python" ] }, { - "input": "python-flask-petstore.sh", + "input": "python-server-flask-petstore.sh", "matches": [ "Server: Python" ] @@ -878,12 +878,6 @@ "Client: Rust" ] }, - { - "input": "rust-reqwest-petstore.sh", - "matches": [ - "Client: Rust" - ] - }, { "input": "rust-server-petstore.sh", "matches": [ @@ -1311,6 +1305,76 @@ "matches": [ "Announcement" ] + }, + { + "input": "[typescript] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-angular] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-angularjs] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-aurelia] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-axios] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-fetch] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-inversify] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-jquery] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-node] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "[typescript-rxjs] Generic typescript text", + "matches": [ + "Client: TypeScript" + ] + }, + { + "input": "Should not auto-label for typescript outside of brackets.", + "matches": [] } ] } \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8a0f48657bc..78cb721df02 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ ### PR checklist - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md). -- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before . +- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before. - [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc). - [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.1.x`, `5.0.x`. Default: `master`. - [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language. diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index 1cc6d47e68e..f623319907a 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -138,6 +138,7 @@ labels: - '\s*?-[gl] swift[34]+\s*?' - '\s*?-[gl] swift2-deprecated\s*?' 'Client: TypeScript': + - '\s*?\[typescript\]\s*?' - '\s*?\[typescript-[\-a-z]+\]\s*?' - '\s*?-[gl] typescript-[\-a-z]+\s*?' # 'Client: VB/VB.net': # NOTE: Not yet implemented diff --git a/.travis.yml b/.travis.yml index 50ec571010b..2e034e8a7c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,10 +71,10 @@ before_install: - docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - docker ps -a # Add bats test framework and cURL for Bash script integration tests - #- sudo add-apt-repository ppa:duggan/bats --yes - #- sudo apt-get update -qq - #- sudo apt-get install -qq bats - #- sudo apt-get install -qq curl + - sudo add-apt-repository ppa:duggan/bats --yes + - sudo apt-get update -qq + - sudo apt-get install -qq bats + - sudo apt-get install -qq curl # install dart #- sudo apt-get update #- sudo apt-get install apt-transport-https @@ -94,16 +94,11 @@ before_install: # - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18). # - . ~/otp/18.2.1/activate && erl -version #- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH" - # install valgrind for C++ memory test - - sudo apt-get install valgrind - # install Qt 5.10 - # comment out the following due to failure in downloading http://ppa.launchpad.net/beineri/opt-qt-5.10.1-trusty/ubuntu/dists/xenial/main/binary-amd64/Packages - #- sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty - #- sudo apt-get update -qq - #- sudo apt-get install qt510-meta-minimal - #- source /opt/qt510/bin/qt510-env.sh - #- qmake -v - + # install C++ tools + - sudo apt install -y --no-install-recommends valgrind cmake build-essential + # install Qt5 + - sudo apt install -y --no-install-recommends qt5-default + - cmake --version # show host table to confirm petstore.swagger.io is mapped to localhost - cat /etc/hosts # show java version diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 5ec17313965..b7142b28a9d 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -24,6 +24,10 @@ elif [ "$NODE_INDEX" = "2" ]; then # install elm-format npm install -g elm-format + # clear any changes to the samples + git checkout -- . + + # look for outdated samples ./bin/utils/ensure-up-to-date fi #elif [ "$NODE_INDEX" = "3" ]; then diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java index d9b17065f7c..02f5da4c221 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java @@ -15,33 +15,57 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); + assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } } diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java index 668342d96d7..458e73e8a7e 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java @@ -22,13 +22,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -36,7 +38,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +46,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java index d9b17065f7c..2122bf1dbd8 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java @@ -15,33 +15,55 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } } diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java index 668342d96d7..caca03ba11b 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java @@ -22,10 +22,11 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); @@ -36,7 +37,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +45,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java index fa9f3afbdd7..2b32dccf324 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java @@ -61,6 +61,7 @@ public class PetApiTest { ApiClient oldClient = api.getApiClient(); ApiClient newClient = new ApiClient(); + newClient.setVerifyingSsl(true); newClient.setBasePath("http://example.com"); newClient.setDebugging(true); @@ -145,6 +146,14 @@ public class PetApiTest { } } while (result.isEmpty()); assertPetMatches(pet, fetched); + } + + @Test + public void testCreateAndGetPetAsyncInvalidID() throws Exception { + Pet pet = createPet(); + api.addPet(pet); + // to store returned Pet or error message/exception + final Map result = new HashMap(); // test getting a nonexistent pet result.clear(); @@ -171,8 +180,11 @@ public class PetApiTest { }); // wait for the asynchronous call to finish (at most 10 seconds) - tryCount = 1; + final int maxTry = 10; + int tryCount = 1; + Pet fetched = null; ApiException exception = null; + do { if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); Thread.sleep(1000); @@ -413,16 +425,16 @@ public class PetApiTest { assertEquals(expected.getId(), actual.getId()); assertNotNull(actual.getCategory()); assertEquals(expected.getCategory().getName(), - actual.getCategory().getName()); + actual.getCategory().getName()); } /** * Assert that the given upload/download progress list satisfies the * following constraints: - * - * - List is not empty - * - Byte count should be nondecreasing - * - The last element, and only the last element, should have done=true + *

+ * - List is not empty + * - Byte count should be nondecreasing + * - The last element, and only the last element, should have done=true */ private void assertValidProgress(List progressList) { assertFalse(progressList.isEmpty()); @@ -433,7 +445,7 @@ public class PetApiTest { if (prev != null) { if (prev.done || prev.bytes > progress.bytes) { fail("Progress list out of order at index " + index - + ": " + progressList); + + ": " + progressList); } } prev = progress; @@ -449,9 +461,9 @@ public class PetApiTest { private final CountDownLatch latch; private final ConcurrentLinkedQueue uploadProgress = - new ConcurrentLinkedQueue(); + new ConcurrentLinkedQueue(); private final ConcurrentLinkedQueue downloadProgress = - new ConcurrentLinkedQueue(); + new ConcurrentLinkedQueue(); private boolean done; private boolean success; diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java index d5a88132307..da25043b27e 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java @@ -15,46 +15,52 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInQueryWithNullValue() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } @@ -63,14 +69,51 @@ public class ApiKeyAuthTest { public void testApplyToParamsInHeaderWithNullValue() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey(null); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); + assertEquals(0, headerParams.size()); + } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } + + @Test + public void testApplyToParamsInCookieWithNullValue() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey(null); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to parameters + assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(0, headerParams.size()); } } diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java index d27a15f4dc0..e963ea24f7f 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java @@ -22,13 +22,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -36,7 +38,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +46,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); @@ -54,7 +56,7 @@ public class HttpBasicAuthTest { headerParams = new HashMap(); auth.setUsername(null); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); assertEquals(0, headerParams.size()); diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java index eef07a5309c..2a21136cfe0 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java @@ -17,31 +17,53 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); assertEquals("my-api-key", queryParams.get("api_key").get(0)); - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN").get(0)); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + MultiValueMap queryParams = new LinkedMultiValueMap(); + HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or cookie parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN").get(0)); + } } diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java index 04522ec56c5..79eec957fcb 100644 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java +++ b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java @@ -24,13 +24,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -38,7 +40,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization").get(1)); @@ -46,7 +48,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization").get(2)); diff --git a/README.md b/README.md index 9ead17a9b64..6e781a7e585 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.0-SNAPSHOT`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.1-SNAPSHOT`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) @@ -60,7 +60,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | |-|-| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) -**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) +**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc** **Configuration files** | [**Apache2**](https://httpd.apache.org/) **Others** | **GraphQL**, **JMeter**, **MySQL Schema**, **Protocol Buffer** @@ -84,6 +84,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se - [3.2 - Workflow Integration](#32---workflow-integration-maven-gradle-github-cicd) - [3.3 - Online Generators](#33---online-openapi-generator) - [3.4 - License Information on Generated Code](#34---license-information-on-generated-code) + - [3.5 - IDE Integration](#35---ide-integration) - [4 - Companies/Projects using OpenAPI Generator](#4---companiesprojects-using-openapi-generator) - [5 - Presentations/Videos/Tutorials/Books](#5---presentationsvideostutorialsbooks) - [6 - About Us](#6---about-us) @@ -101,8 +102,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) -4.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.0-SNAPSHOT/)| 09.10.2019 | Minor release (breaking changes with fallbacks) -[4.1.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.1.3) (latest stable release) | 04.10.2019 | Patch release (bug fixes, enhancements) +4.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.3.0-SNAPSHOT/)| 29.02.2020 | Minor release (breaking changes with fallbacks) +4.2.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.1-SNAPSHOT/)| 15.11.2019 | Patch release +[4.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.0) (latest stable release) | 31.10.2019 | Minor release (bug fixes, enhancements, breaking chanages with fallbacks) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -158,16 +160,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar` +JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar -O openapi-generator-cli.jar +wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -382,10 +384,10 @@ openapi-generator version ``` -Or install a particular OpenAPI Generator version (e.g. v4.1.3): +Or install a particular OpenAPI Generator version (e.g. v4.2.0): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.1.3 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.0 -g ``` Or install it as dev-dependency: @@ -409,7 +411,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.1.3/openapi-generator-cli-4.1.3.jar) +You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.0/openapi-generator-cli-4.2.0.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` @@ -537,17 +539,32 @@ The OpenAPI Generator project is intended as a benefit for users of the Open API * Generated code is intentionally _not_ subject to the parent project license When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate. + +### [3.5 - IDE Integration](#table-of-contents) + +Here is a list of community-conitributed IDE plug-ins that integrate with OpenAPI Generator: + +- Eclipse: [Codewind OpenAPI Tools for Eclipse](https://www.eclipse.org/codewind/open-api-tools-for-eclipse.html) by [IBM](https://www.ibm.com) +- IntelliJ IDEA: [OpenAPI Generator](https://plugins.jetbrains.com/plugin/8433-openapi-generator) by [Jim Schubert](https://jimschubert.us/#/) +- IntelliJ IDEA: [Senya Editor](https://plugins.jetbrains.com/plugin/10690-senya-editor) by [senya.io](https://senya.io) +- [RepreZen API Studio](https://www.reprezen.com/) +- Visual Studio: [REST API Client Code Generator](https://marketplace.visualstudio.com/items?itemName=ChristianResmaHelle.ApiClientCodeGenerator) by [Christian Resma Helle](https://christian-helle.blogspot.com/) +- Visual Studio Code: [Codewind OpenAPI Tools](https://marketplace.visualstudio.com/items?itemName=IBM.codewind-openapi-tools) by [IBM](https://marketplace.visualstudio.com/publishers/IBM) + ## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents) Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page. - [Adaptant Solutions AG](https://www.adaptant.io/) - [Angular.Schule](https://angular.schule/) +- [Australia and New Zealand Banking Group (ANZ)](http://www.anz.com/) - [ASKUL](https://www.askul.co.jp) +- [Arduino](https://www.arduino.cc/) - [b<>com](https://b-com.com/en) - [Banzai Cloud](https://banzaicloud.com) - [BIMData.io](https://bimdata.io) - [Bithost GmbH](https://www.bithost.ch) +- [Bosch Connected Industry](https://www.bosch-connected-industry.com) - [Boxever](https://www.boxever.com/) - [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) @@ -556,31 +573,42 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Commencis](https://www.commencis.com/) - [Cupix](https://www.cupix.com/) - [DB Systel](https://www.dbsystel.de) +- [dwango](https://dwango.co.jp/) +- [Edge Impulse](https://www.edgeimpulse.com/) - [Element AI](https://www.elementai.com/) +- [Fenergo](https://www.fenergo.com/) - [FormAPI](https://formapi.io/) - [Fuse](https://www.fuse.no/) - [Gantner](https://www.gantner.com) - [GenFlow](https://github.com/RepreZen/GenFlow) - [GMO Pepabo](https://pepabo.com/en/) - [GoDaddy](https://godaddy.com) +- [Here](https://developer.here.com/) +- [IBM](https://www.ibm.com/) - [JustStar](https://www.juststarinfo.com) - [Klarna](https://www.klarna.com/) - [Médiavision](https://www.mediavision.fr/) - [Metaswitch](https://www.metaswitch.com/) - [Myworkout](https://myworkout.com) +- [NamSor](https://www.namsor.com/) +- [Openet](https://www.openet.com/) - [Paxos](https://www.paxos.com) +- [Ponicode](https://ponicode.dev/) - [Pricefx](https://www.pricefx.com/) - [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager) - [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch) +- [RedHat](https://www.redhat.com) - [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development) - [REST United](https://restunited.com) - [Stingray](http://www.stingray.com) - [Suva](https://www.suva.ch/) - [Telstra](https://dev.telstra.com) +- [TravelTime platform](https://www.traveltimeplatform.com/) - [TUI InfoTec GmbH](http://www.tui-infotec.com/) - [unblu inc.](https://www.unblu.com/) - [Veamly](https://www.veamly.com/) - [WSO2](https://wso2.com/) +- [Vouchery.io](https://vouchery.io) - [Xero](https://www.xero.com/) - [Yelp](https://www.yelp.com/) - [Zalando](https://www.zalando.com) @@ -643,9 +671,13 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-22 - [RESTful APIs: Tutorial of OpenAPI Specification](https://medium.com/@amirm.lavasani/restful-apis-tutorial-of-openapi-specification-eeada0e3901d) by [Amir Lavasani](https://medium.com/@amirm.lavasani) - 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/) - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) +- 2019-09-24 - [Eine Stunde was mit Api First!](https://www.slideshare.net/JanWeinschenker/eine-stunde-was-mit-api-first) by [@janweinschenker](https://twitter.com/janweinschenker) at [Java Forum Nord](https://javaforumnord.de/) - 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) +- 2019-10-10 - [Automatic Generation of REST Clients](https://www.meetup.com/fr-FR/Criteo-Labs-Tech-Talks/events/264775768/) by Thomas Peyrard, Senior Software Engineer at Criteo in [Full-Stack Tech Talks (Meetup)](https://www.meetup.com/fr-FR/Criteo-Labs-Tech-Talks/events/264775768/) - 2019-10-12 - [OpenApi自动生成client](https://blog.csdn.net/wxid2798226/article/details/102527467) by [郑泽洲](https://me.csdn.net/wxid2798226) - +- 2019-10-16 - [How to ship APIs faster?](https://medium.com/@accounts_76224/how-to-ship-apis-faster-cabef2f819e4) by [Simon Guilliams @ PoniCode](https://ponicode.dev) +- 2019-10-22 - [OpenAPI + Spring Boot(Kotlin)でファイルダウンロードAPIを作成する](https://qiita.com/boronngo/items/4b78b92526209daeaee9) by [Yuki Furukawa](https://twitter.com/yuki_furukawa5) +- 2019-10-24 - [Microprofile OpenAPI - Code First or Design First?](https://github.com/pe-st/apidocs/blob/master/MicroProfile-OpenAPI-all-slides.pdf) by [Peter [pɛʃə] Steiner](https://twitter.com/pesche) at [eclipsecon Europe 2019](https://www.eclipsecon.org/europe2019/sessions/microprofile-openapi-code-first-or-design-first) ## [6 - About Us](#table-of-contents) @@ -754,6 +786,7 @@ Here is a list of template creators: * Java Undertow: @stevehu * Java Play Framework: @JFCote * Java PKMST: @anshu2185 @sanshuman @rkumar-pk @ninodpillai + * Java Vert.x: @lwlee2608 * JAX-RS RestEasy: @chameleon82 * JAX-RS CXF: @hiveship * JAX-RS CXF (CDI): @nickcmaynard @@ -837,8 +870,8 @@ If you want to join the committee, please kindly apply by sending an email to te | GraphQL | @renepardon (2018/12) | | Groovy | | | Haskell | | -| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) | -| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) | +| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) | +| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) | | Lua | @daurnimator (2017/08) | | Nim | | | NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) | @@ -847,7 +880,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) | | PowerShell | | -| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) | +| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @slash-arun (2019/11) | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) @richardwhiuk (2019/07) | diff --git a/bin/ci/php-slim-server-petstore.json b/bin/ci/php-slim-server-petstore.json index c189ba439c3..4341586b330 100644 --- a/bin/ci/php-slim-server-petstore.json +++ b/bin/ci/php-slim-server-petstore.json @@ -1,5 +1,5 @@ { - "generatorName": "php-slim", + "generatorName": "php-slim-deprecated", "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", "outputDir": "samples/server/petstore/php-slim", "templateDir": "modules/openapi-generator/src/main/resources/php-slim-server" diff --git a/bin/dart-dio-petstore.sh b/bin/dart-dio-petstore.sh new file mode 100755 index 00000000000..724c0f9b087 --- /dev/null +++ b/bin/dart-dio-petstore.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" + +# Generate non-browserClient +ags="generate -t modules/openapi-generator/src/main/resources/dart-dio -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-dio -o samples/client/petstore/dart-dio/ --additional-properties hideGenerationTimestamp=true $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-gin-petstore-server.sh b/bin/go-gin-petstore-server.sh index b18bffcdff7..98dd63100a2 100755 --- a/bin/go-gin-petstore-server.sh +++ b/bin/go-gin-petstore-server.sh @@ -29,8 +29,8 @@ SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" GENERATOR="go-gin-server" STUB_DIR="samples/server/petstore/go-gin-api-server" -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR +echo "Removing auto-generated files and folders under $STUB_DIR" +rm -rf $STUB_DIR/go # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" @@ -38,4 +38,3 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags -#!/usr/bin/env bash \ No newline at end of file diff --git a/bin/go-petstore-server.sh b/bin/go-petstore-server.sh index 3e5c19e436b..e8ac83eba82 100755 --- a/bin/go-petstore-server.sh +++ b/bin/go-petstore-server.sh @@ -29,8 +29,8 @@ SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" GENERATOR="go-server" STUB_DIR="samples/server/petstore/go-api-server" -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR +echo "Removing auto-generated files and folders under $STUB_DIR" +rm -rf $STUB_DIR/go # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" diff --git a/bin/java-vertx-web-rx-petstore-server.sh b/bin/java-vertx-web-rx-petstore-server.sh new file mode 100755 index 00000000000..16a9b48ed18 --- /dev/null +++ b/bin/java-vertx-web-rx-petstore-server.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" +GENERATOR="java-vertx-web" +TEMPLATE="modules/openapi-generator/src/main/resources/JavaVertXWebServer" +STUB_DIR="samples/server/petstore/java-vertx-web/rx" + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -i $SPEC -t $TEMPLATE -g $GENERATOR --artifact-id java-vertx-web-rx-server -o $STUB_DIR --additional-properties hideGenerationTimestamp=true $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-slim-server-petstore.sh b/bin/openapi3/php-slim-server-petstore.sh index 814645929e6..e497f4f027f 100755 --- a/bin/openapi3/php-slim-server-petstore.sh +++ b/bin/openapi3/php-slim-server-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim -o samples/server/petstore/php-slim $@" +ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim-deprecated -o samples/server/petstore/php-slim $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-slim4-server-petstore.sh b/bin/openapi3/php-slim4-server-petstore.sh new file mode 100755 index 00000000000..904c4675b3f --- /dev/null +++ b/bin/openapi3/php-slim4-server-petstore.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/php-slim4-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim4 -o samples/server/petstore/php-slim4 $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-slim-server-petstore.sh b/bin/php-slim-server-petstore.sh index 43725870917..b26b0589595 100755 --- a/bin/php-slim-server-petstore.sh +++ b/bin/php-slim-server-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim -o samples/server/petstore/php-slim $@" +ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim-deprecated -o samples/server/petstore/php-slim $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-slim4-server-petstore.sh b/bin/php-slim4-server-petstore.sh new file mode 100755 index 00000000000..a87ebbcc7ac --- /dev/null +++ b/bin/php-slim4-server-petstore.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/php-slim4-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim4 -o samples/server/petstore/php-slim4 $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-petstore-all.sh b/bin/typescript-angular-petstore-all.sh index 327c9f79119..bdcd3cdc959 100755 --- a/bin/typescript-angular-petstore-all.sh +++ b/bin/typescript-angular-petstore-all.sh @@ -14,3 +14,4 @@ ./bin/typescript-angular-v7-petstore-provided-in-root.sh ./bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh ./bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh +./bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh diff --git a/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh b/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh new file mode 100755 index 00000000000..993a143da6d --- /dev/null +++ b/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name --additional-properties ngVersion=8.0.0,apiModulePrefix=PetStore $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index adc1993015f..f97dd12b8fe 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -39,6 +39,7 @@ declare -a scripts=( "./bin/php-symfony-petstore.sh" "./bin/php-lumen-petstore-server.sh" "./bin/php-slim-server-petstore.sh" +"./bin/php-slim4-server-petstore.sh" "./bin/php-ze-ph-petstore-server.sh" "./bin/openapi3/php-petstore.sh" "./bin/typescript-angularjs-petstore.sh" @@ -60,6 +61,7 @@ declare -a scripts=( "./bin/go-experimental-petstore.sh" "./bin/go-petstore.sh" "./bin/go-petstore-withxml.sh" +"./bin/go-petstore-server.sh" "./bin/go-gin-petstore-server.sh" "./bin/groovy-petstore.sh" "./bin/apex-petstore.sh" diff --git a/bin/utils/openapi-generator-cli.sh b/bin/utils/openapi-generator-cli.sh index fcca6b35ec7..4fea493715f 100644 --- a/bin/utils/openapi-generator-cli.sh +++ b/bin/utils/openapi-generator-cli.sh @@ -22,7 +22,7 @@ set -o pipefail for cmd in {mvn,jq,curl}; do if ! command -v ${cmd} > /dev/null; then - >&2 echo "This script requires '${cmd}' to be installed." + >&2 echo "This script requires '${cmd}' to be installed." exit 1 fi done @@ -42,7 +42,18 @@ artifactid=openapi-generator-cli ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)} jar=${artifactid}-${ver}.jar -DIR=${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"} + +# TODO: Remove OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR for release 5.0 +if [ -n "${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR}" ]; then + >&2 printf "[WARN] Variable OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR is misspelled.\nPlease change to OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR. This option will be removed in the 5.0 release.\n" +fi +cachedir=${OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR:-"$OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR"} + +DIR=${cachedir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"} + +if [ ! -d "${DIR}" ]; then + mkdir -p "${DIR}" +fi if [ ! -f ${DIR}/${jar} ]; then repo="central::default::https://repo1.maven.org/maven2/" diff --git a/bin/windows/dart-dio-petstore.bat b/bin/windows/dart-dio-petstore.bat new file mode 100755 index 00000000000..6905d655468 --- /dev/null +++ b/bin/windows/dart-dio-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-dio -o samples\client\petstore\dart-dio --additional-properties hideGenerationTimestamp=true +java %JAVA_OPTS% -jar %executable% %ags% + diff --git a/bin/windows/go-gin-petstore-server.bat b/bin/windows/go-gin-petstore-server.bat index f46a0482b22..894976e9991 100644 --- a/bin/windows/go-gin-petstore-server.bat +++ b/bin/windows/go-gin-petstore-server.bat @@ -11,7 +11,7 @@ set GENERATOR=go-gin-server set STUB_DIR=samples\server\petstore\go-gin-api-server echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR% +del /F /S /Q %STUB_DIR%\go REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver diff --git a/bin/windows/go-petstore-server.bat b/bin/windows/go-petstore-server.bat index c4eb17284ae..e520f5b252a 100644 --- a/bin/windows/go-petstore-server.bat +++ b/bin/windows/go-petstore-server.bat @@ -11,11 +11,11 @@ set GENERATOR=go-server set STUB_DIR=samples\server\petstore\go-api-server echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR% +del /F /S /Q %STUB_DIR%\go REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver java %JAVA_OPTS% -jar %executable% %ags% -endlocal \ No newline at end of file +endlocal diff --git a/bin/windows/php-slim-server-petstore.bat b/bin/windows/php-slim-server-petstore.bat index 395804560b3..4e896f0184e 100755 --- a/bin/windows/php-slim-server-petstore.bat +++ b/bin/windows/php-slim-server-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim -o samples\server\petstore\php-slim +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim-deprecated -o samples\server\petstore\php-slim java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-slim4-server-petstore.bat b/bin/windows/php-slim4-server-petstore.bat new file mode 100644 index 00000000000..c1ac0ef7325 --- /dev/null +++ b/bin/windows/php-slim4-server-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim4 -o samples\server\petstore\php-slim4 + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python-experimental-petstore.bat b/bin/windows/python-experimental-petstore.bat index 50df98535f4..2680649d00f 100644 --- a/bin/windows/python-experimental-petstore.bat +++ b/bin/windows/python-experimental-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples\client\petstore\python-experimental -DpackageName=petstore_api +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\python-client-experimental\petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples\client\petstore\python-experimental --additional-properties packageName=petstore_api java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-petstore-all.bat b/bin/windows/typescript-angular-petstore-all.bat index 8f3abe5afc4..bc57daca4bb 100644 --- a/bin/windows/typescript-angular-petstore-all.bat +++ b/bin/windows/typescript-angular-petstore-all.bat @@ -12,3 +12,4 @@ call .\bin\windows\typescript-angular-v7-provided-in-root-with-npm.bat call .\bin\windows\typescript-angular-v7-not-provided-in-root.bat call .\bin\windows\typescript-angular-v7-not-provided-in-root-with-npm.bat call .\bin\windows\typescript-angular-v8-provided-in-root-with-npm.bat +call .\bin\windows\typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat diff --git a/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat b/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat new file mode 100644 index 00000000000..1929c6542ed --- /dev/null +++ b/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v8-provided-in-root\builds\with-prefixed-module-name --additional-properties ngVersion=8.0.0,apiModulePrefix=PetStore + + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-jquery-with-npm.bat b/bin/windows/typescript-jquery-with-npm.bat index 7f6a206e8bb..a72a03b5419 100644 --- a/bin/windows/typescript-jquery-with-npm.bat +++ b/bin/windows/typescript-jquery-with-npm.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-petstore-npm.json -g typescript-jquery -o samples\client\petstore\typescript-jquery\npm +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-jquery-petstore-npm.json -g typescript-jquery -o samples\client\petstore\typescript-jquery\npm java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators.md b/docs/generators.md index 849200fecb3..cb82d39ff02 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -88,6 +88,7 @@ The following generators are available: * [java-play-framework](generators/java-play-framework.md) * [java-undertow-server](generators/java-undertow-server.md) * [java-vertx](generators/java-vertx.md) +* [java-vertx-web (beta)](generators/java-vertx-web.md) * [jaxrs-cxf](generators/jaxrs-cxf.md) * [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md) * [jaxrs-cxf-extended](generators/jaxrs-cxf-extended.md) @@ -103,7 +104,8 @@ The following generators are available: * [php-laravel](generators/php-laravel.md) * [php-lumen](generators/php-lumen.md) * [php-silex](generators/php-silex.md) -* [php-slim](generators/php-slim.md) +* [php-slim-deprecated (deprecated)](generators/php-slim-deprecated.md) +* [php-slim4](generators/php-slim4.md) * [php-symfony](generators/php-symfony.md) * [php-ze-ph](generators/php-ze-ph.md) * [python-aiohttp](generators/python-aiohttp.md) diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index bac7b07b4d4..802eaae3ee3 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -10,7 +10,7 @@ sidebar_label: csharp |sourceFolder|source folder for generated code| |src| |packageGuid|The GUID that will be associated with the C# project| |null| |interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5+ compatible
**v5.0**
.NET Standard 1.3 compatible
**uwp**
Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)
|v4.5| +|targetFramework|The target .NET framework version.|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5+ compatible
**v5.0**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 96cfde1fa94..b828257f3f8 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -11,3 +11,4 @@ sidebar_label: haskell |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|serveStatic|serve will serve files from the directory 'static'.| |true| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md new file mode 100644 index 00000000000..059acc0a2a0 --- /dev/null +++ b/docs/generators/java-vertx-web.md @@ -0,0 +1,42 @@ +--- +title: Config Options for java-vertx-web +sidebar_label: java-vertx-web +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model| +|apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api| +|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| +|groupId|groupId in generated pom.xml| |org.openapitools| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| +|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| +|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|sourceFolder|source folder for generated code| |src/main/java| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date (if you really have a good reason not to use threetenbp
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
**threetenbp**
Backport of JSR310 (preferred for jdk < 1.8)
|java8| +|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|false| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md new file mode 100644 index 00000000000..47784d3e934 --- /dev/null +++ b/docs/generators/php-slim-deprecated.md @@ -0,0 +1,18 @@ +--- +title: Config Options for php-slim-deprecated +sidebar_label: php-slim-deprecated +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|modelPackage|package for generated models| |null| +|apiPackage|package for generated api classes| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|srcBasePath|The directory to serve as source root.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md new file mode 100644 index 00000000000..05307722bbb --- /dev/null +++ b/docs/generators/php-slim4.md @@ -0,0 +1,19 @@ +--- +title: Config Options for php-slim4 +sidebar_label: php-slim4 +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|modelPackage|package for generated models| |null| +|apiPackage|package for generated api classes| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|srcBasePath|The directory to serve as source root.| |null| +|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|psr7Implementation|Slim 4 provides its own PSR-7 implementation so that it works out of the box. However, you are free to replace Slim’s default PSR-7 objects with a third-party implementation. Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html|
**slim-psr7**
Slim PSR-7 Message implementation
**nyholm-psr7**
Nyholm PSR-7 Message implementation
**guzzle-psr7**
Guzzle PSR-7 Message implementation
**zend-diactoros**
Zend Diactoros PSR-7 Message implementation
|slim-psr7| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 69104b5212b..1ab11ff90e0 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -19,6 +19,7 @@ sidebar_label: typescript-angular |taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| |providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| |ngVersion|The version of Angular.| |8.0.0| +|apiModulePrefix|The prefix of the generated ApiModule.| |null| |serviceSuffix|The suffix of the generated service.| |Service| |serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service| |modelSuffix|The suffix of the generated model.| |null| diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 68d9947f4d3..d836faf38b3 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -45,7 +45,7 @@ compileJava.dependsOn tasks.openApiGenerate [source,group] ---- plugins { - id "org.openapi.generator" version "4.1.1" + id "org.openapi.generator" version "4.2.0" } ---- @@ -61,7 +61,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:4.1.1" + classpath "org.openapitools:openapi-generator-gradle-plugin:4.2.0" } } @@ -626,7 +626,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' - classpath('org.openapitools:openapi-generator-gradle-plugin:4.1.1') { + classpath('org.openapitools:openapi-generator-gradle-plugin:4.2.0') { exclude group: 'com.google.guava' } } diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 442ad536754..fa60040099e 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.2.61' + ext.kotlin_version = '1.3.20' repositories { mavenLocal() mavenCentral() @@ -15,7 +15,7 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.0-rc-3" + classpath "gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.1.3" classpath "com.gradle.publish:plugin-publish-plugin:0.10.1" classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0" classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.2.0" diff --git a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index 612f9e88eda..44e7c4d1d7b 100644 --- a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://downloads.gradle.org/distributions/gradle-4.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 052071b744b..cc243d6b593 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -17,7 +17,7 @@ true - 4.10.2 + 5.2.1 diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index ea472e09a49..702381eed21 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=4.1.1 openApiValidate +gradle -PopenApiGeneratorVersion=4.2.0 openApiValidate ``` diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index 01e959447ff..d7bce4b9b27 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -18,6 +18,7 @@ package org.openapitools.generator.gradle.plugin.extensions import org.gradle.api.Project import org.gradle.kotlin.dsl.listProperty +import org.gradle.kotlin.dsl.mapProperty import org.gradle.kotlin.dsl.property /** @@ -66,7 +67,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { /** * Sets specified system properties. */ - val systemProperties = project.objects.property>() + val systemProperties = project.objects.mapProperty() /** * Path to json configuration file. @@ -108,22 +109,22 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { /** * Sets instantiation type mappings. */ - val instantiationTypes = project.objects.property>() + val instantiationTypes = project.objects.mapProperty() /** * Sets mappings between OpenAPI spec types and generated code types. */ - val typeMappings = project.objects.property>() + val typeMappings = project.objects.mapProperty() /** * Sets additional properties that can be referenced by the mustache templates. */ - val additionalProperties = project.objects.property>() + val additionalProperties = project.objects.mapProperty() /** * Sets server variable for server URL template substitution, in the format of name=value,name=value. */ - val serverVariables = project.objects.property>() + val serverVariables = project.objects.mapProperty() /** * Specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: String,boolean,Boolean,Double. @@ -133,7 +134,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { /** * Specifies mappings between a given class and the import that should be used for that class. */ - val importMappings = project.objects.property>() + val importMappings = project.objects.mapProperty() /** * Root package for generated code. @@ -188,7 +189,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { /** * Specifies how a reserved name should be escaped to. Otherwise, the default _ is used. */ - val reservedWordsMappings = project.objects.property>() + val reservedWordsMappings = project.objects.mapProperty() /** * Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation. @@ -304,7 +305,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { /** * A map of options specific to a generator. */ - val configOptions = project.objects.property>() + val configOptions = project.objects.mapProperty() init { applyDefaults() diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 83f206fd491..a0f2ceccf6d 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -24,6 +24,7 @@ import org.gradle.api.tasks.TaskAction import org.gradle.internal.logging.text.StyledTextOutput import org.gradle.internal.logging.text.StyledTextOutputFactory import org.gradle.kotlin.dsl.listProperty +import org.gradle.kotlin.dsl.mapProperty import org.gradle.kotlin.dsl.property import org.openapitools.codegen.CodegenConstants import org.openapitools.codegen.DefaultGenerator @@ -90,7 +91,7 @@ open class GenerateTask : DefaultTask() { * Sets specified system properties. */ @get:Internal - val systemProperties = project.objects.property>() + val systemProperties = project.objects.mapProperty() /** * Path to json configuration file. @@ -140,27 +141,27 @@ open class GenerateTask : DefaultTask() { * Sets instantiation type mappings. */ @get:Internal - val instantiationTypes = project.objects.property>() + val instantiationTypes = project.objects.mapProperty() /** * Sets mappings between OpenAPI spec types and generated code types. */ @get:Internal - val typeMappings = project.objects.property>() + val typeMappings = project.objects.mapProperty() /** * Sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. * You can also have multiple occurrences of this option. */ @get:Internal - val additionalProperties = project.objects.property>() + val additionalProperties = project.objects.mapProperty() /** * Sets server variable for server URL template substitution, in the format of name=value,name=value. * You can also have multiple occurrences of this option. */ @get:Internal - val serverVariables = project.objects.property>() + val serverVariables = project.objects.mapProperty() /** * Specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: String,boolean,Boolean,Double. @@ -172,7 +173,7 @@ open class GenerateTask : DefaultTask() { * Specifies mappings between a given class and the import that should be used for that class. */ @get:Internal - val importMappings = project.objects.property>() + val importMappings = project.objects.mapProperty() /** * Root package for generated code. @@ -238,7 +239,7 @@ open class GenerateTask : DefaultTask() { * Specifies how a reserved name should be escaped to. */ @get:Internal - val reservedWordsMappings = project.objects.property>() + val reservedWordsMappings = project.objects.mapProperty() /** * Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation. @@ -372,7 +373,7 @@ open class GenerateTask : DefaultTask() { * A dynamic map of options specific to a generator. */ @get:Internal - val configOptions = project.objects.property>() + val configOptions = project.objects.mapProperty() private fun Property.ifNotEmpty(block: Property.(T) -> Unit) { if (isPresent) { diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 2d02194aab3..b1bb352e773 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 4.1.1 + 4.2.0 diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 7749b7886f5..84e9a4828a3 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -198,8 +198,8 @@ 1.3.0 26.0-jre 1.0.2 - 2.9.5 - 2.6.4 + 2.9.10 + 2.9.10 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 5963b8791b0..b42f6119996 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -26,9 +26,9 @@ import java.util.Objects; public class CodegenParameter { public boolean isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, hasMore, isContainer, - secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel; + secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode; public String baseName, paramName, dataType, datatypeWithEnum, dataFormat, - collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName; + collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style; public String example; // example value (x-example) public String jsonSchema; @@ -173,6 +173,7 @@ public class CodegenParameter { output.isFreeFormObject = this.isFreeFormObject; output.isListContainer = this.isListContainer; output.isMapContainer = this.isMapContainer; + output.isExplode = this.isExplode; return output; } @@ -247,7 +248,8 @@ public class CodegenParameter { Objects.equals(maxItems, that.maxItems) && Objects.equals(minItems, that.minItems) && Objects.equals(uniqueItems, that.uniqueItems) && - Objects.equals(multipleOf, that.multipleOf); + Objects.equals(multipleOf, that.multipleOf) && + Objects.equals(isExplode, that.isExplode); } @Override @@ -316,7 +318,8 @@ public class CodegenParameter { maxItems, minItems, uniqueItems, - multipleOf); + multipleOf, + isExplode); } @java.lang.Override @@ -386,6 +389,7 @@ public class CodegenParameter { ", minItems=" + minItems + ", uniqueItems=" + uniqueItems + ", multipleOf=" + multipleOf + + ", isExplode=" + isExplode + '}'; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index ab3ef8b418e..f29243ef151 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen; -import com.fasterxml.jackson.core.JsonProcessingException; import com.google.common.base.CaseFormat; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; @@ -1894,7 +1893,7 @@ public class DefaultCodegen implements CodegenConfig { } } - if(composed.getRequired() != null) { + if (composed.getRequired() != null) { required.addAll(composed.getRequired()); } addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); @@ -2003,7 +2002,7 @@ public class DefaultCodegen implements CodegenConfig { addProperties(properties, required, component); } - if(schema.getRequired() != null) { + if (schema.getRequired() != null) { required.addAll(schema.getRequired()); } @@ -2509,15 +2508,15 @@ public class DefaultCodegen implements CodegenConfig { /** * Set op's returnBaseType, returnType, examples etc. * - * @param operation endpoint Operation - * @param schemas a map of the schemas in the openapi spec - * @param op endpoint CodegenOperation + * @param operation endpoint Operation + * @param schemas a map of the schemas in the openapi spec + * @param op endpoint CodegenOperation * @param methodResponse the default ApiResponse for the endpoint */ protected void handleMethodResponse(Operation operation, - Map schemas, - CodegenOperation op, - ApiResponse methodResponse) { + Map schemas, + CodegenOperation op, + ApiResponse methodResponse) { Schema responseSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getSchemaFromResponse(methodResponse)); if (responseSchema != null) { @@ -3099,7 +3098,15 @@ public class DefaultCodegen implements CodegenConfig { // set default value codegenParameter.defaultValue = toDefaultValue(parameterSchema); - // TDOO revise collectionFormat + if (parameter.getStyle() != null) { + codegenParameter.style = parameter.getStyle().toString(); + } + + // the default value is false + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode + codegenParameter.isExplode = parameter.getExplode() == null ? false : parameter.getExplode(); + + // TODO revise collectionFormat String collectionFormat = null; if (ModelUtils.isArraySchema(parameterSchema)) { // for array parameter final ArraySchema arraySchema = (ArraySchema) parameterSchema; @@ -3617,7 +3624,7 @@ public class DefaultCodegen implements CodegenConfig { co.baseName = tag; } - private void addParentContainer(CodegenModel model, String name, Schema schema) { + protected void addParentContainer(CodegenModel model, String name, Schema schema) { final CodegenProperty property = fromProperty(name, schema); addImport(model, property.complexType); model.parent = toInstantiationType(schema); @@ -4094,7 +4101,7 @@ public class DefaultCodegen implements CodegenConfig { * * @param name string to be sanitize * @param removeCharRegEx a regex containing all char that will be removed - * @param exceptionList a list of matches which should not be sanitized (i.e expections) + * @param exceptionList a list of matches which should not be sanitized (i.e expections) * @return sanitized string */ @SuppressWarnings("static-method") @@ -4522,8 +4529,8 @@ public class DefaultCodegen implements CodegenConfig { for (String consume : consumesInfo) { if (consume != null && - (consume.toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded") || - consume.toLowerCase(Locale.ROOT).startsWith("multipart"))) { + (consume.toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded") || + consume.toLowerCase(Locale.ROOT).startsWith("multipart"))) { return true; } } @@ -5015,7 +5022,6 @@ public class DefaultCodegen implements CodegenConfig { codegenParameter.pattern = codegenProperty.pattern; - if (codegenProperty.complexType != null) { imports.add(codegenProperty.complexType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index d48702a62af..eb4ed1e9164 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -109,7 +109,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code "object", // used as internal variables, can collide with parameter names "localVarPath", "localVarQueryParams", "localVarCollectionQueryParams", - "localVarHeaderParams", "localVarFormParams", "localVarPostBody", + "localVarHeaderParams", "localVarCookieParams", "localVarFormParams", "localVarPostBody", "localVarAccepts", "localVarAccept", "localVarContentTypes", "localVarContentType", "localVarAuthNames", "localReturnType", "ApiClient", "ApiException", "ApiResponse", "Configuration", "StringUtil", diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index ddc38ce2059..57c45a76fb0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -184,6 +184,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co typeMapping.put("file", "java.io.File"); typeMapping.put("array", "kotlin.Array"); typeMapping.put("list", "kotlin.collections.List"); + typeMapping.put("set", "kotlin.collections.Set"); typeMapping.put("map", "kotlin.collections.Map"); typeMapping.put("object", "kotlin.Any"); typeMapping.put("binary", "kotlin.Array"); @@ -697,6 +698,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co // TODO: collection type here should be fully qualified namespace to avoid model conflicts // This supports arrays of arrays. String arrayType = typeMapping.get("array"); + if (Boolean.TRUE.equals(arr.getUniqueItems())) { + arrayType = typeMapping.get("set"); + } StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = arr.getItems(); String nestedType = getTypeDeclaration(items); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 1500a1405ce..0676c8f2413 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -34,6 +34,7 @@ import java.text.SimpleDateFormat; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -441,12 +442,16 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public String getSchemaType(Schema p) { String openAPIType = super.getSchemaType(p); String type = null; - if (typeMapping.containsKey(openAPIType)) { + if (ModelUtils.isComposedSchema(p)) { + return openAPIType; + } else if (typeMapping.containsKey(openAPIType)) { type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) + if (languageSpecificPrimitives.contains(type)) { return type; - } else + } + } else { type = openAPIType; + } return toModelName(type); } @@ -560,6 +565,20 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp } } + @Override + protected void addImport(CodegenModel m, String type) { + if (type == null) { + return; + } + + String[] parts = type.split("( [|&] )|[<>]"); + for (String s : parts) { + if (needToImport(s)) { + m.imports.add(s); + } + } + } + @Override public Map postProcessModels(Map objs) { // process enum in models @@ -701,11 +720,43 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp @Override public String toAnyOfName(List names, ComposedSchema composedSchema) { - return String.join(" | ", names); + List types = composedSchema.getAnyOf().stream().map(schema -> { + String schemaType = getSchemaType(schema); + if (ModelUtils.isArraySchema(schema)) { + ArraySchema ap = (ArraySchema) schema; + Schema inner = ap.getItems(); + schemaType = schemaType + "<" + getSchemaType(inner) + ">"; + } + return schemaType; + }).distinct().collect(Collectors.toList()); + return String.join(" | ", types); } @Override public String toOneOfName(List names, ComposedSchema composedSchema) { - return String.join(" | ", names); + List types = composedSchema.getOneOf().stream().map(schema -> { + String schemaType = getSchemaType(schema); + if (ModelUtils.isArraySchema(schema)) { + ArraySchema ap = (ArraySchema) schema; + Schema inner = ap.getItems(); + schemaType = schemaType + "<" + getSchemaType(inner) + ">"; + } + return schemaType; + }).distinct().collect(Collectors.toList()); + return String.join(" | ", types); + } + + @Override + public String toAllOfName(List names, ComposedSchema composedSchema) { + List types = composedSchema.getAllOf().stream().map(schema -> { + String schemaType = getSchemaType(schema); + if (ModelUtils.isArraySchema(schema)) { + ArraySchema ap = (ArraySchema) schema; + Schema inner = ap.getItems(); + schemaType = schemaType + "<" + getSchemaType(inner) + ">"; + } + return schemaType; + }).distinct().collect(Collectors.toList()); + return String.join(" & ", types); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 94992fd9fcb..7965641d64e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -53,6 +53,8 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; + protected static int emptyMethodNameCounter = 0; + public static final String CURL_OPTIONS = "curlOptions"; public static final String PROCESS_MARKDOWN = "processMarkdown"; public static final String SCRIPT_NAME = "scriptName"; @@ -99,6 +101,26 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { public BashClientCodegen() { super(); + setReservedWordsLowerCase( + Arrays.asList( + "case", + "do", + "done", + "elif", + "else", + "esac", + "fi", + "for", + "function", + "if", + "in", + "select", + "then", + "until", + "while" + ) + ); + /** * Set the output folder here */ @@ -411,9 +433,9 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { /** * Convert OpenAPI Parameter object to Codegen Parameter object + * * @param imports set of imports for library/package/module * @param param OpenAPI parameter object - * * @return Codegen Parameter object */ @Override @@ -749,5 +771,29 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { return camelize(name); } + @Override + public String toOperationId(String operationId) { + // rename to empty_method_name_1 (e.g.) if method name is empty + if (StringUtils.isEmpty(operationId)) { + operationId = camelize("empty_method_name_" + emptyMethodNameCounter++, true); + LOGGER.warn("Empty method name (operationId) found. Renamed to " + operationId); + return operationId; + } + + // method name cannot use reserved keyword, e.g. return + if (isReservedWord(operationId)) { + String newOperationId = underscore("call" + camelize(operationId)); + LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId); + return newOperationId; + } + + // operationId starts with a number + if (operationId.matches("^\\d.*")) { + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + operationId = "call_" + operationId; + } + + return camelize(sanitizeName(operationId), true); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 2ab520ec3de..3efe1b9a6b0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -132,8 +132,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { .put(NET35, ".NET Framework 3.5 compatible") .put(NET40, ".NET Framework 4.0 compatible") .put(NET45, ".NET Framework 4.5+ compatible") - .put(NETSTANDARD, ".NET Standard 1.3 compatible") - .put(UWP, "Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)") + .put(NETSTANDARD, ".NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)") + .put(UWP, "Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)") .build(); framework.defaultValue(this.targetFramework); framework.setEnum(frameworks); @@ -276,6 +276,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { setValidatable(Boolean.FALSE); setSupportsAsync(Boolean.FALSE); } else if (NETSTANDARD.equals(this.targetFramework)) { + LOGGER.warn(".NET Standard 1.3 support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead."); // TODO: NETSTANDARD here is misrepresenting a PCL v5.0 which supports .NET Framework 4.6+, .NET Core 1.0, and Windows Universal 10.0 additionalProperties.put(MCS_NET_VERSION_KEY, "4.6-api"); if (additionalProperties.containsKey("supportsUWP")) { @@ -293,6 +294,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { //Todo implement it excludeTests = true; } else if (UWP.equals(this.targetFramework)) { + LOGGER.warn("UWP support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead."); + // TODO: NETSTANDARD here is misrepresenting a PCL v5.0 which supports .NET Framework 4.6+, .NET Core 1.0, and Windows Universal 10.0 setTargetFrameworkNuget("uwp"); setSupportsAsync(Boolean.TRUE); setSupportsUWP(Boolean.TRUE); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 7e4f21d662e..e06440e5443 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -81,7 +81,8 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { "is", "library", "new", "null", "operator", "part", "rethrow", "return", "set", "static", "super", "switch", "sync*", "this", "throw", "true", "try", "typedef", "var", "void", "while", - "with", "yield", "yield*") + "with", "yield", "yield*", "hide", "interface", "mixin", "on", + "show", "async") ); languageSpecificPrimitives = new HashSet( @@ -300,6 +301,11 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { name = "model_" + name; // e.g. return => ModelReturn (after camelize) } + if (name.matches("^\\d.*")) { + LOGGER.warn(name + " (model name starts with number) cannot be used as model name. Renamed to " + camelize("model_" + name)); + name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) + } + // camelize the model name // phone_number => PhoneNumber return camelize(name); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 5bc9c832808..f61e1b7b55c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -38,6 +38,7 @@ import java.util.Set; import io.swagger.v3.oas.models.media.Schema; +import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; public class DartDioClientCodegen extends DartClientCodegen { @@ -61,7 +62,6 @@ public class DartDioClientCodegen extends DartClientCodegen { private static final String SERIALIZATION_JSON = "json"; private boolean nullableFields = true; - private String serialization = SERIALIZATION_JSON; public DartDioClientCodegen() { super(); @@ -78,8 +78,9 @@ public class DartDioClientCodegen extends DartClientCodegen { typeMapping.put("file", "Uint8List"); typeMapping.put("binary", "Uint8List"); - importMapping.put("BuiltList", "built_collection/built_collection"); - importMapping.put("BuiltMap", "built_collection/built_collection"); + importMapping.put("BuiltList", "package:built_collection/built_collection.dart"); + importMapping.put("BuiltMap", "package:built_collection/built_collection.dart"); + importMapping.put("Uint8List", "dart:typed_data"); } @Override @@ -102,6 +103,32 @@ public class DartDioClientCodegen extends DartClientCodegen { return super.toDefaultValue(p); } + @Override + public String escapeReservedWord(String name) { + if (this.reservedWordsMappings().containsKey(name)) { + return this.reservedWordsMappings().get(name); + } + return "_" + name; + } + + @Override + public String toEnumVarName(String name, String datatype) { + if (name.length() == 0) { + return "empty"; + } + if ("number".equalsIgnoreCase(datatype) || + "int".equalsIgnoreCase(datatype)) { + name = "Number" + name; + } + name = camelize(name, true); + + // for reserved word or word starting with number, append _ + if (isReservedWord(name) || name.matches("^\\d.*")) { + name = escapeReservedWord(name); + } + return name; + } + @Override public void processOpts() { if (StringUtils.isEmpty(System.getenv("DART_POST_PROCESS_FILE"))) { @@ -182,7 +209,7 @@ public class DartDioClientCodegen extends DartClientCodegen { modelImports.add(importMapping.get(modelImport)); } else { if (!modelToIgnore.contains(modelImport.toLowerCase(Locale.ROOT))) { - modelImports.add(pubName + "/model/" + underscore(modelImport)); + modelImports.add("package:" + pubName + "/model/" + underscore(modelImport) + ".dart"); } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index 3f7ffe4124d..a4951e19c5d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -19,6 +19,8 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.slf4j.Logger; @@ -26,6 +28,8 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.List; +import java.util.Map; public class GoServerCodegen extends AbstractGoCodegen { @@ -70,6 +74,15 @@ public class GoServerCodegen extends AbstractGoCodegen { "controller-api.mustache", // the template to use ".go"); // the extension for each file to write + /* + * Service templates. You can write services for each Api file with the apiTemplateFiles map. + These services are skeletons built to implement the logic of your api using the + expected parameters and response. + */ + apiTemplateFiles.put( + "service.mustache", // the template to use + "_service.go"); // the extension for each file to write + /* * Template Location. This is the location which templates will be read from. The generator * will use the resource stream to attempt to read the templates. @@ -142,9 +155,50 @@ public class GoServerCodegen extends AbstractGoCodegen { supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile")); supportingFiles.add(new SupportingFile("routers.mustache", sourceFolder, "routers.go")); supportingFiles.add(new SupportingFile("logger.mustache", sourceFolder, "logger.go")); + supportingFiles.add(new SupportingFile("api.mustache", sourceFolder, "api.go")); writeOptional(outputFolder, new SupportingFile("README.mustache", "", "README.md")); } + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + @SuppressWarnings("unchecked") + Map objectMap = (Map) objs.get("operations"); + @SuppressWarnings("unchecked") + List operations = (List) objectMap.get("operation"); + + List> imports = (List>) objs.get("imports"); + if (imports == null) + return objs; + + // override imports to only include packages for interface parameters + imports.clear(); + + boolean addedOptionalImport = false; + boolean addedTimeImport = false; + boolean addedOSImport = false; + boolean addedReflectImport = false; + for (CodegenOperation operation : operations) { + for (CodegenParameter param : operation.allParams) { + // import "os" if the operation uses files + if (!addedOSImport && "*os.File".equals(param.dataType)) { + imports.add(createMapping("import", "os")); + addedOSImport = true; + } + + // import "time" if the operation has a required time parameter. + if (param.required) { + if (!addedTimeImport && "time.Time".equals(param.dataType)) { + imports.add(createMapping("import", "time")); + addedTimeImport = true; + } + } + } + } + + return objs; + } + @Override public String apiPackage() { return sourceFolder; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index ec30ae275e1..8a0d0980096 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -43,6 +43,10 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf protected String apiVersion = "0.0.1"; private static final Pattern LEADING_UNDERSCORE = Pattern.compile("^_+"); + public static final String PROP_SERVE_STATIC = "serveStatic"; + public static final String PROP_SERVE_STATIC_DESC = "serve will serve files from the directory 'static'."; + public static final Boolean PROP_SERVE_STATIC_DEFAULT = Boolean.TRUE; + /** * Configures the type of generator. * @@ -183,6 +187,15 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); + cliOptions.add(new CliOption(PROP_SERVE_STATIC, PROP_SERVE_STATIC_DESC).defaultValue(PROP_SERVE_STATIC_DEFAULT.toString())); + } + + public void setBooleanProperty(String property, Boolean defaultValue) { + if (additionalProperties.containsKey(property)) { + additionalProperties.put(property, convertPropertyToBoolean(property)); + } else { + additionalProperties.put(property, defaultValue); + } } @Override @@ -192,6 +205,8 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf if (StringUtils.isEmpty(System.getenv("HASKELL_POST_PROCESS_FILE"))) { LOGGER.info("Hint: Environment variable HASKELL_POST_PROCESS_FILE not defined so the Haskell code may not be properly formatted. To define it, try 'export HASKELL_POST_PROCESS_FILE=\"$HOME/.local/bin/hfmt -w\"' (Linux/Mac)"); } + + setBooleanProperty(PROP_SERVE_STATIC, PROP_SERVE_STATIC_DEFAULT); } /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index f548ea530a5..d534f39c3a0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -676,15 +676,17 @@ public class JavaClientCodegen extends AbstractJavaCodegen var.getVendorExtensions().put("isJacksonOptionalNullable", isOptionalNullable); } if (addImports) { - cm.imports.add("JsonNullable"); - Map itemJsonNullable = new HashMap(); - itemJsonNullable.put("import", "org.openapitools.jackson.nullable.JsonNullable"); - imports.add(itemJsonNullable); - - cm.imports.add("NoSuchElementException"); - Map itemExc = new HashMap(); - itemExc.put("import", "java.util.NoSuchElementException"); - imports.add(itemExc); + Map imports2Classnames = new HashMap() {{ + put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable"); + put("NoSuchElementException", "java.util.NoSuchElementException"); + put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore"); + }}; + for (Map.Entry entry : imports2Classnames.entrySet()) { + cm.imports.add(entry.getKey()); + Map importsItem = new HashMap(); + importsItem.put("import", entry.getValue()); + imports.add(importsItem); + } } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index 47df13f7295..afa273f2850 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -59,7 +60,7 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen { apiDocTemplateFiles.remove("api_doc.mustache"); if(GlobalSettings.getProperty("swagger.codegen.undertow.apipackage") != null && GlobalSettings.getProperty("openapi.codegen.undertow.apipackage") == null) { - LOGGER.warn("System property 'swagger.codegen.undertow.apipackage' was renamed to 'swagger.codegen.undertow.apipackage'"); + LOGGER.warn("System property 'swagger.codegen.undertow.apipackage' was renamed to 'openapi.codegen.undertow.apipackage'"); apiPackage = GlobalSettings.getProperty("swagger.codegen.undertow.apipackage", "org.openapitools.handler"); } else { apiPackage = GlobalSettings.getProperty("openapi.codegen.undertow.apipackage", "org.openapitools.handler"); @@ -100,7 +101,7 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen { // keep the yaml in config folder for framework validation. supportingFiles.add(new SupportingFile("openapi.mustache", ("src.main.resources.config").replace(".", java.io.File.separator), "openapi.json")); - supportingFiles.add(new SupportingFile("handler.mustache", ("src.main.java.org.openapitools.handler").replace(".", java.io.File.separator), "PathHandlerProvider.java")); + supportingFiles.add(new SupportingFile("handler.mustache", (String.format(Locale.ROOT, "src.main.java.%s", apiPackage)).replace(".", java.io.File.separator), "PathHandlerProvider.java")); supportingFiles.add(new SupportingFile("service.mustache", ("src.main.resources.META-INF.services").replace(".", java.io.File.separator), "com.networknt.server.HandlerProvider")); // configuration files diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java new file mode 100644 index 00000000000..1f79ab8dd56 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java @@ -0,0 +1,161 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.media.Schema; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.SupportingFile; + +import java.io.File; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +public class JavaVertXWebServerCodegen extends AbstractJavaCodegen { + + protected String resourceFolder = "src/main/resources"; + protected String apiVersion = "1.0.0-SNAPSHOT"; + + public JavaVertXWebServerCodegen() { + super(); + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + + // set the output folder here + outputFolder = "generated-code" + File.separator + "java-vertx-web"; + + modelTemplateFiles.clear(); + modelTemplateFiles.put("model.mustache", ".java"); + + apiTemplateFiles.clear(); + apiTemplateFiles.put("api.mustache", ".java"); + apiTemplateFiles.put("apiImpl.mustache", "Impl.java"); + apiTemplateFiles.put("apiHandler.mustache", "Handler.java"); + + embeddedTemplateDir = templateDir = "JavaVertXWebServer"; + + invokerPackage = "org.openapitools.vertxweb.server"; + apiPackage = invokerPackage + ".api"; + modelPackage = invokerPackage + ".model"; + artifactId = "openapi-java-vertx-web-server"; + artifactVersion = apiVersion; + this.setDateLibrary("java8"); + + // clioOptions default redifinition need to be updated + updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); + updateOption(CodegenConstants.ARTIFACT_VERSION, this.getArtifactVersion()); + updateOption(CodegenConstants.API_PACKAGE, apiPackage); + updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage); + updateOption(CodegenConstants.INVOKER_PACKAGE, invokerPackage); + updateOption(this.DATE_LIBRARY, this.getDateLibrary()); + + // Override type mapping + typeMapping.put("file", "FileUpload"); + } + + public CodegenType getTag() { + return CodegenType.SERVER; + } + + public String getName() { + return "java-vertx-web"; + } + + public String getHelp() { + return "Generates a Java Vert.x-Web Server (beta)."; + } + + @Override + public void processOpts() { + super.processOpts(); + + apiTestTemplateFiles.clear(); + + importMapping.remove("JsonCreator"); + importMapping.remove("com.fasterxml.jackson.annotation.JsonProperty"); + importMapping.put("JsonInclude", "com.fasterxml.jackson.annotation.JsonInclude"); + importMapping.put("JsonProperty", "com.fasterxml.jackson.annotation.JsonProperty"); + importMapping.put("JsonValue", "com.fasterxml.jackson.annotation.JsonValue"); + importMapping.put("FileUpload", "io.vertx.ext.web.FileUpload"); + + modelDocTemplateFiles.clear(); + apiDocTemplateFiles.clear(); + + String sourcePackageFolder = sourceFolder + File.separator + invokerPackage.replace(".", File.separator); + supportingFiles.clear(); + supportingFiles.add(new SupportingFile("supportFiles/openapi.mustache", resourceFolder, "openapi.yaml")); + supportingFiles.add(new SupportingFile("supportFiles/HttpServerVerticle.mustache", sourcePackageFolder, "HttpServerVerticle.java")); + supportingFiles.add(new SupportingFile("supportFiles/MainVerticle.mustache", sourcePackageFolder, "MainVerticle.java")); + supportingFiles.add(new SupportingFile("supportFiles/ApiResponse.mustache", sourcePackageFolder, "ApiResponse.java")); + supportingFiles.add(new SupportingFile("supportFiles/ApiException.mustache", sourcePackageFolder, "ApiException.java")); + supportingFiles.add(new SupportingFile("supportFiles/ParameterCast.mustache", sourcePackageFolder, "ParameterCast.java")); + supportingFiles.add(new SupportingFile("supportFiles/pom.mustache", "", "pom.xml")); + + writeOptional(outputFolder, new SupportingFile("README.mustache", "", "README.md")); + } + + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + super.postProcessModelProperty(model, property); + if (!model.isEnum) { + model.imports.add("JsonInclude"); + model.imports.add("JsonProperty"); + if (model.hasEnums) { + model.imports.add("JsonValue"); + } + } + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + Map newObjs = super.postProcessOperationsWithModels(objs, allModels); + Map operations = (Map) newObjs.get("operations"); + if (operations != null) { + List ops = (List) operations.get("operation"); + for (CodegenOperation operation : ops) { + operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT); + + if (operation.returnType == null) { + operation.returnType = "Void"; + } + } + } + return newObjs; + } + + @Override + public Map postProcessSupportingFileData(Map objs) { + generateYAMLSpecFile(objs); + return super.postProcessSupportingFileData(objs); + } + + @Override + public CodegenModel fromModel(String name, Schema model) { + CodegenModel codegenModel = super.fromModel(name, model); + codegenModel.imports.remove("ApiModel"); + codegenModel.imports.remove("ApiModelProperty"); + return codegenModel; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 4f41bf090bc..b7e5836a8b2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -19,7 +19,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; @@ -38,6 +41,8 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { public static final String DATE_LIBRARY = "dateLibrary"; public static final String COLLECTION_TYPE = "collectionType"; + protected static final String VENDOR_EXTENSION_BASE_NAME_LITERAL = "x-base-name-literal"; + protected String dateLibrary = DateLibrary.JAVA8.value; protected String collectionType = CollectionType.ARRAY.value; @@ -188,29 +193,48 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { // multiplatform default includes defaultIncludes.add("io.ktor.client.request.forms.InputProvider"); + defaultIncludes.add(packageName + ".infrastructure.Base64ByteArray"); + defaultIncludes.add(packageName + ".infrastructure.OctetByteArray"); // multiplatform type mapping typeMapping.put("number", "kotlin.Double"); - typeMapping.put("file", "InputProvider"); + typeMapping.put("file", "OctetByteArray"); + typeMapping.put("binary", "OctetByteArray"); + typeMapping.put("ByteArray", "Base64ByteArray"); + typeMapping.put("object", "kotlin.String"); // kotlin.Any not serializable // multiplatform import mapping importMapping.put("BigDecimal", "kotlin.Double"); importMapping.put("UUID", "kotlin.String"); importMapping.put("URI", "kotlin.String"); importMapping.put("InputProvider", "io.ktor.client.request.forms.InputProvider"); - importMapping.put("File", "io.ktor.client.request.forms.InputProvider"); + importMapping.put("File", packageName + ".infrastructure.OctetByteArray"); importMapping.put("Timestamp", "kotlin.String"); importMapping.put("LocalDateTime", "kotlin.String"); importMapping.put("LocalDate", "kotlin.String"); importMapping.put("LocalTime", "kotlin.String"); + importMapping.put("Base64ByteArray", packageName + ".infrastructure.Base64ByteArray"); + importMapping.put("OctetByteArray", packageName + ".infrastructure.OctetByteArray"); // multiplatform specific supporting files + supportingFiles.add(new SupportingFile("infrastructure/Base64ByteArray.kt.mustache", infrastructureFolder, "Base64ByteArray.kt")); + supportingFiles.add(new SupportingFile("infrastructure/Bytes.kt.mustache", infrastructureFolder, "Bytes.kt")); supportingFiles.add(new SupportingFile("infrastructure/HttpResponse.kt.mustache", infrastructureFolder, "HttpResponse.kt")); + supportingFiles.add(new SupportingFile("infrastructure/OctetByteArray.kt.mustache", infrastructureFolder, "OctetByteArray.kt")); + + // multiplatform specific auth + final String authFolder = (sourceFolder + File.separator + packageName + File.separator + "auth").replace(".", "/"); + supportingFiles.add(new SupportingFile("auth/ApiKeyAuth.kt.mustache", authFolder, "ApiKeyAuth.kt")); + supportingFiles.add(new SupportingFile("auth/Authentication.kt.mustache", authFolder, "Authentication.kt")); + supportingFiles.add(new SupportingFile("auth/HttpBasicAuth.kt.mustache", authFolder, "HttpBasicAuth.kt")); + supportingFiles.add(new SupportingFile("auth/HttpBearerAuth.kt.mustache", authFolder, "HttpBearerAuth.kt")); + supportingFiles.add(new SupportingFile("auth/OAuth.kt.mustache", authFolder, "OAuth.kt")); // multiplatform specific testing files - supportingFiles.add(new SupportingFile("commonTest/coroutine.mustache", "src/commonTest/kotlin/util", "Coroutine.kt")); - supportingFiles.add(new SupportingFile("iosTest/coroutine.mustache", "src/iosTest/kotlin/util", "Coroutine.kt")); - supportingFiles.add(new SupportingFile("jvmTest/coroutine.mustache", "src/jvmTest/kotlin/util", "Coroutine.kt")); + supportingFiles.add(new SupportingFile("commonTest/Coroutine.kt.mustache", "src/commonTest/kotlin/util", "Coroutine.kt")); + supportingFiles.add(new SupportingFile("iosTest/Coroutine.kt.mustache", "src/iosTest/kotlin/util", "Coroutine.kt")); + supportingFiles.add(new SupportingFile("jsTest/Coroutine.kt.mustache", "src/jsTest/kotlin/util", "Coroutine.kt")); + supportingFiles.add(new SupportingFile("jvmTest/Coroutine.kt.mustache", "src/jvmTest/kotlin/util", "Coroutine.kt")); // gradle wrapper supporting files supportingFiles.add(new SupportingFile("gradlew.mustache", "", "gradlew")); @@ -253,6 +277,31 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { return getLibrary() != null && (getLibrary().contains(JVM_OKHTTP4) || getLibrary().contains(JVM_OKHTTP3)); } + @Override + public Map postProcessModels(Map objs) { + Map objects = super.postProcessModels(objs); + @SuppressWarnings("unchecked") List models = (List) objs.get("models"); + + for (Object model : models) { + @SuppressWarnings("unchecked") Map mo = (Map) model; + CodegenModel cm = (CodegenModel) mo.get("model"); + + // escape the variable base name for use as a string literal + if (cm.requiredVars != null) { + for (CodegenProperty var : cm.requiredVars) { + var.vendorExtensions.put(VENDOR_EXTENSION_BASE_NAME_LITERAL, var.baseName.replace("$", "\\$")); + } + } + if (cm.optionalVars != null) { + for (CodegenProperty var : cm.optionalVars) { + var.vendorExtensions.put(VENDOR_EXTENSION_BASE_NAME_LITERAL, var.baseName.replace("$", "\\$")); + } + } + } + + return objects; + } + @Override @SuppressWarnings("unchecked") public Map postProcessOperationsWithModels(Map objs, List allModels) { @@ -261,11 +310,22 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { if (operations != null) { List ops = (List) operations.get("operation"); for (CodegenOperation operation : ops) { + + // set multipart against all relevant operations if (operation.hasConsumes == Boolean.TRUE) { if (isMultipartType(operation.consumes)) { operation.isMultipart = Boolean.TRUE; } } + + // modify the data type of binary form parameters to a more friendly type for multiplatform builds + if (MULTIPLATFORM.equals(getLibrary()) && operation.allParams != null) { + for (CodegenParameter param : operation.allParams) { + if (param.dataFormat != null && param.dataFormat.equals("binary")) { + param.baseType = param.dataType = "io.ktor.client.request.forms.InputProvider"; + } + } + } } } return operations; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java new file mode 100644 index 00000000000..c286e9e9732 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -0,0 +1,149 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.security.SecurityScheme; +import io.swagger.v3.oas.models.servers.Server; +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.*; + +import static org.openapitools.codegen.utils.StringUtils.*; + +public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { + private static final Logger LOGGER = LoggerFactory.getLogger(PhpSlim4ServerCodegen.class); + + public static final String PSR7_IMPLEMENTATION = "psr7Implementation"; + + protected String psr7Implementation = "slim-psr7"; + protected List> composerPackages = new ArrayList>(); + protected List> composerDevPackages = new ArrayList>(); + + public PhpSlim4ServerCodegen() { + super(); + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.STABLE) + .build(); + + outputFolder = "generated-code" + File.separator + "slim4"; + embeddedTemplateDir = templateDir = "php-slim4-server"; + + // override cliOptions from AbstractPhpCodegen + updateOption(AbstractPhpCodegen.VARIABLE_NAMING_CONVENTION, "camelCase"); + + // Slim 4 can use any PSR-7 implementation + // https://www.slimframework.com/docs/v4/concepts/value-objects.html + CliOption psr7Option = new CliOption(PSR7_IMPLEMENTATION, + "Slim 4 provides its own PSR-7 implementation so that it works out of the box. However, you are free to replace Slim’s default PSR-7 objects with a third-party implementation. Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html"); + + psr7Option.addEnum("slim-psr7", "Slim PSR-7 Message implementation") + .addEnum("nyholm-psr7", "Nyholm PSR-7 Message implementation") + .addEnum("guzzle-psr7", "Guzzle PSR-7 Message implementation") + .addEnum("zend-diactoros", "Zend Diactoros PSR-7 Message implementation") + .setDefault("slim-psr7"); + + cliOptions.add(psr7Option); + } + + @Override + public String getName() { + return "php-slim4"; + } + + @Override + public String getHelp() { + return "Generates a PHP Slim 4 Framework server library."; + } + + @Override + public void processOpts() { + super.processOpts(); + + if (additionalProperties.containsKey(PSR7_IMPLEMENTATION)) { + this.setPsr7Implementation((String) additionalProperties.get(PSR7_IMPLEMENTATION)); + } + + // reset implementation flags + additionalProperties.put("isSlimPsr7", Boolean.FALSE); + additionalProperties.put("isNyholmPsr7", Boolean.FALSE); + additionalProperties.put("isGuzzlePsr7", Boolean.FALSE); + additionalProperties.put("isZendDiactoros", Boolean.FALSE); + + // set specific PSR-7 implementation flag + switch (getPsr7Implementation()) { + case "slim-psr7": + additionalProperties.put("isSlimPsr7", Boolean.TRUE); + break; + case "nyholm-psr7": + additionalProperties.put("isNyholmPsr7", Boolean.TRUE); + break; + case "guzzle-psr7": + additionalProperties.put("isGuzzlePsr7", Boolean.TRUE); + break; + case "zend-diactoros": + additionalProperties.put("isZendDiactoros", Boolean.TRUE); + break; + default: + LOGGER.warn("\"" + getPsr7Implementation() + "\" is invalid \"psr7Implementation\" codegen option. Default \"slim-psr7\" used instead."); + additionalProperties.put("isSlimPsr7", Boolean.TRUE); + } + + // Slim 4 doesn't parse JSON body anymore we need to add suggested middleware + // ref: https://www.slimframework.com/docs/v4/objects/request.html#the-request-body + supportingFiles.add(new SupportingFile("json_body_parser_middleware.mustache", toSrcPath(invokerPackage + "\\Middleware", srcBasePath), "JsonBodyParserMiddleware.php")); + } + + /** + * Set PSR-7 implementation package. + * Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html + * + * @param psr7Implementation PSR-7 implementation package + */ + public void setPsr7Implementation(String psr7Implementation) { + switch (psr7Implementation) { + case "slim-psr7": + case "nyholm-psr7": + case "guzzle-psr7": + case "zend-diactoros": + this.psr7Implementation = psr7Implementation; + break; + default: + this.psr7Implementation = "slim-psr7"; + LOGGER.warn("\"" + (String) psr7Implementation + "\" is invalid \"psr7Implementation\" argument. Default \"slim-psr7\" used instead."); + } + } + + /** + * Returns PSR-7 implementation package. + * + * @return PSR-7 implementation package + */ + public String getPsr7Implementation() { + return this.psr7Implementation; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java index d63d0a30e0c..dac4cd5774d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java @@ -23,6 +23,8 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +48,10 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen { public PhpSlimServerCodegen() { super(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + // clear import mapping (from default generator) as slim does not use it // at the moment importMapping.clear(); @@ -85,12 +91,12 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen { @Override public String getName() { - return "php-slim"; + return "php-slim-deprecated"; } @Override public String getHelp() { - return "Generates a PHP Slim Framework server library."; + return "Generates a PHP Slim Framework server library. IMPORTANT NOTE: this generator (Slim 3.x) is no longer actively maintained so please use 'php-slim4' generator instead."; } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 71dd5d61133..13cbb443aab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -50,6 +50,9 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); + // this may set datatype right for additional properties + instantiationTypes.put("map", "dict"); + apiTemplateFiles.remove("api.mustache"); apiTemplateFiles.put("python-experimental/api.mustache", ".py"); @@ -76,6 +79,20 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { supportingFiles.add(new SupportingFile("python-experimental/model_utils.mustache", packagePath(), "model_utils.py")); + Boolean generateSourceCodeOnly = false; + if (additionalProperties.containsKey(CodegenConstants.SOURCECODEONLY_GENERATION)) { + generateSourceCodeOnly = Boolean.valueOf(additionalProperties.get(CodegenConstants.SOURCECODEONLY_GENERATION).toString()); + } + + if (!generateSourceCodeOnly) { + supportingFiles.remove(new SupportingFile("setup.mustache", "", "setup.py")); + supportingFiles.add(new SupportingFile("python-experimental/setup.mustache", "", "setup.py")); + supportingFiles.remove(new SupportingFile("requirements.mustache", "", "requirements.txt")); + supportingFiles.add(new SupportingFile("python-experimental/requirements.mustache", "", "requirements.txt")); + supportingFiles.remove(new SupportingFile("test-requirements.mustache", "", "test-requirements.txt")); + supportingFiles.add(new SupportingFile("python-experimental/test-requirements.mustache", "", "test-requirements.txt")); + } + // default this to true so the python ModelSimple models will be generated ModelUtils.setGenerateAliasAsModel(true); LOGGER.info(CodegenConstants.GENERATE_ALIAS_AS_MODEL + " is hard coded to true in this generator. Alias models will only be generated if they contain validations or enums"); @@ -196,10 +213,20 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } } - @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - // add regex information to property - postProcessPattern(property.pattern, property.vendorExtensions); + public void addModelImport(Map objs, CodegenModel cm, String otherModelName) { + // adds the absolute path to otherModelName as an import in CodegenModel cm + HashMap referencedModel = (HashMap) objs.get(otherModelName); + if (referencedModel == null) { + // this happens with a model where type=string and format=number which is a non-standard format + return; + } + ArrayList myModel = (ArrayList) referencedModel.get("models"); + HashMap modelData = (HashMap) myModel.get(0); + String importPath = (String) modelData.get("importPath"); + // only add importPath to parameters if it isn't in importPaths + if (!cm.imports.contains(importPath)) { + cm.imports.add(importPath); + } } // override with any special post-processing for all models @@ -213,6 +240,41 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { List> models = (List>) inner.get("models"); for (Map mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); + + // fix the imports that each model has, change them to absolute + // imports + // clear out imports so we will only include full path imports + cm.imports.clear(); + CodegenDiscriminator discriminator = cm.discriminator; + if (discriminator != null) { + Set mappedModels = discriminator.getMappedModels(); + for (CodegenDiscriminator.MappedModel mappedModel : mappedModels) { + String otherModelName = mappedModel.getModelName(); + addModelImport(objs, cm, otherModelName); + } + } + ArrayList> listOfLists= new ArrayList>(); + listOfLists.add(cm.allVars); + listOfLists.add(cm.requiredVars); + listOfLists.add(cm.optionalVars); + listOfLists.add(cm.vars); + for (List varList : listOfLists) { + for (CodegenProperty cp : varList) { + String otherModelName = null; + if (cp.complexType != null) { + otherModelName = cp.complexType; + } + if (cp.mostInnerItems != null) { + if (cp.mostInnerItems.complexType != null) { + otherModelName = cp.mostInnerItems.complexType; + } + } + if (otherModelName != null) { + addModelImport(objs, cm, otherModelName); + } + } + } + Schema modelSchema = ModelUtils.getSchema(this.openAPI, cm.name); CodegenProperty modelProperty = fromProperty("value", modelSchema); if (cm.isEnum || cm.isAlias) { @@ -491,11 +553,6 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } } - @Override - public void postProcessParameter(CodegenParameter parameter) { - postProcessPattern(parameter.pattern, parameter.vendorExtensions); - } - /** * Convert OAS Model object to Codegen Model object * @@ -559,11 +616,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } } - // return all models which don't need their properties connected to non-object models - if (propertyToModelName.isEmpty()) { - return result; - } - + // set regex values, before it was only done on model.vars // fix all property references to non-object models, make those properties non-primitive and // set their dataType and complexType to the model name, so documentation will refer to the correct model ArrayList> listOfLists = new ArrayList>(); @@ -575,6 +628,9 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { listOfLists.add(result.readWriteVars); for (List cpList : listOfLists) { for (CodegenProperty cp : cpList) { + // set regex values, before it was only done on model.vars + postProcessModelProperty(result, cp); + // fix references to non-object models if (!propertyToModelName.containsKey(cp.name)) { continue; } @@ -589,4 +645,147 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { return result; } + /** + * Output the type declaration of the property + * + * @param schema property schema + * @return a string presentation of the property type + */ + public String getSimpleTypeDeclaration(Schema schema) { + String oasType = getSchemaType(schema); + if (typeMapping.containsKey(oasType)) { + return typeMapping.get(oasType); + } + return oasType; + } + + public String getTypeString(Schema p, String prefix, String suffix) { + // this is used to set dataType, which defines a python tuple of classes + String fullSuffix = suffix; + if (")".equals(suffix)) { + fullSuffix = "," + suffix; + } + if (ModelUtils.isNullable(p)) { + fullSuffix = ", none_type" + suffix; + } + if (ModelUtils.isFreeFormObject(p) && ModelUtils.getAdditionalProperties(p) == null) { + return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; + } + if (ModelUtils.isMapSchema(p)) { + Schema inner = ModelUtils.getAdditionalProperties(p); + return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix; + } else if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + Schema inner = ap.getItems(); + return prefix + "[" + getTypeString(inner, "", "") + "]" + fullSuffix; + } + String baseType = getSimpleTypeDeclaration(p); + if (ModelUtils.isFileSchema(p)) { + baseType = "file_type"; + } + return prefix + baseType + fullSuffix; + } + + /** + * Output the type declaration of a given name + * + * @param p property schema + * @return a string presentation of the type + */ + @Override + public String getTypeDeclaration(Schema p) { + // this is used to set dataType, which defines a python tuple of classes + // in Python we will wrap this in () to make it a tuple but here we + // will omit the parens so the generated documentaion will not include + // them + return getTypeString(p, "", ""); + } + + @Override + public String toInstantiationType(Schema property) { + if (ModelUtils.isArraySchema(property) || ModelUtils.isMapSchema(property) || property.getAdditionalProperties() != null) { + return getSchemaType(property); + } + return super.toInstantiationType(property); + } + + @Override + protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { + Schema addProps = ModelUtils.getAdditionalProperties(schema); + if (addProps != null && addProps.get$ref() == null) { + // if AdditionalProperties exists and is an inline definition, get its datatype and store it in m.parent + String typeString = getTypeDeclaration(addProps); + codegenModel.additionalPropertiesType = typeString; + } else { + addParentContainer(codegenModel, codegenModel.name, schema); + } + } + + @Override + public void setParameterExampleValue(CodegenParameter p) { + // we have a custom version of this function so we can set the file + // type example value + String example; + + if (p.defaultValue == null) { + example = p.example; + } else { + p.example = p.defaultValue; + return; + } + + String type = p.baseType; + if (type == null) { + type = p.dataType; + } + + if ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) { + if (example == null) { + example = p.paramName + "_example"; + } + example = "'" + escapeText(example) + "'"; + } else if ("Integer".equals(type) || "int".equals(type)) { + if (example == null) { + example = "56"; + } + } else if ("Float".equalsIgnoreCase(type) || "Double".equalsIgnoreCase(type)) { + if (example == null) { + example = "3.4"; + } + } else if ("BOOLEAN".equalsIgnoreCase(type) || "bool".equalsIgnoreCase(type)) { + if (example == null) { + example = "True"; + } + } else if ("file".equalsIgnoreCase(type)) { + if (example == null) { + example = "/path/to/file"; + } + example = "open('"+example+"', 'rb')"; + } else if ("Date".equalsIgnoreCase(type)) { + if (example == null) { + example = "2013-10-20"; + } + example = "'" + escapeText(example) + "'"; + } else if ("DateTime".equalsIgnoreCase(type)) { + if (example == null) { + example = "2013-10-20T19:20:30+01:00"; + } + example = "'" + escapeText(example) + "'"; + } else if (!languageSpecificPrimitives.contains(type)) { + // type is a model class, e.g. User + example = this.packageName + "." + type + "()"; + } else { + LOGGER.warn("Type " + type + " not handled properly in setParameterExampleValue"); + } + + if (example == null) { + example = "None"; + } else if (Boolean.TRUE.equals(p.isListContainer)) { + example = "[" + example + "]"; + } else if (Boolean.TRUE.equals(p.isMapContainer)) { + example = "{'key': " + example + "}"; + } + + p.example = example; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 759ce8fa1ce..da3b7078def 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -35,7 +35,6 @@ import java.util.regex.Pattern; import static org.openapitools.codegen.utils.StringUtils.camelize; - public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(Swift4Codegen.class); @@ -388,6 +387,9 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("Cartfile.mustache", "", "Cartfile")); + supportingFiles.add(new SupportingFile("Package.swift.mustache", + "", + "Package.swift")); supportingFiles.add(new SupportingFile("APIHelper.mustache", sourceFolder, "APIHelper.swift")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 55201fadb2f..c4cc372e35a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -36,14 +36,18 @@ import static org.openapitools.codegen.utils.StringUtils.*; public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptAngularClientCodegen.class); + private static String CLASS_NAME_PREFIX_PATTERN = "^[a-zA-Z0-9]*$"; private static String CLASS_NAME_SUFFIX_PATTERN = "^[a-zA-Z0-9]*$"; private static String FILE_NAME_SUFFIX_PATTERN = "^[a-zA-Z0-9.-]*$"; + private static final String DEFAULT_IMPORT_PREFIX = "./"; + public static final String NPM_REPOSITORY = "npmRepository"; public static final String WITH_INTERFACES = "withInterfaces"; public static final String TAGGED_UNIONS = "taggedUnions"; public static final String NG_VERSION = "ngVersion"; public static final String PROVIDED_IN_ROOT = "providedInRoot"; + public static final String API_MODULE_PREFIX = "apiModulePrefix"; public static final String SERVICE_SUFFIX = "serviceSuffix"; public static final String SERVICE_FILE_SUFFIX = "serviceFileSuffix"; public static final String MODEL_SUFFIX = "modelSuffix"; @@ -89,6 +93,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode "Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).", false)); this.cliOptions.add(new CliOption(NG_VERSION, "The version of Angular.").defaultValue(this.ngVersion)); + this.cliOptions.add(new CliOption(API_MODULE_PREFIX, "The prefix of the generated ApiModule.")); this.cliOptions.add(new CliOption(SERVICE_SUFFIX, "The suffix of the generated service.").defaultValue(this.serviceSuffix)); this.cliOptions.add(new CliOption(SERVICE_FILE_SUFFIX, "The suffix of the file of the generated service (service.ts).").defaultValue(this.serviceFileSuffix)); this.cliOptions.add(new CliOption(MODEL_SUFFIX, "The suffix of the generated model.")); @@ -183,6 +188,14 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode if (!ngVersion.atLeast("4.3.0")) { supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts")); } + if (additionalProperties.containsKey(API_MODULE_PREFIX)) { + String apiModulePrefix = additionalProperties.get(API_MODULE_PREFIX).toString(); + validateClassPrefixArgument("ApiModule", apiModulePrefix); + + additionalProperties.put("apiModuleClassName", apiModulePrefix + "ApiModule"); + } else { + additionalProperties.put("apiModuleClassName", "ApiModule"); + } if (additionalProperties.containsKey(SERVICE_SUFFIX)) { serviceSuffix = additionalProperties.get(SERVICE_SUFFIX).toString(); validateClassSuffixArgument("Service", serviceSuffix); @@ -319,16 +332,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } - @Override - public String getSchemaType(Schema p) { - String openAPIType = super.getSchemaType(p); - if (isLanguagePrimitive(openAPIType) || isLanguageGenericType(openAPIType)) { - return openAPIType; - } - applyLocalTypeMapping(openAPIType); - return openAPIType; - } - private String applyLocalTypeMapping(String type) { if (typeMapping.containsKey(type)) { type = typeMapping.get(type); @@ -336,19 +339,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode return type; } - private boolean isLanguagePrimitive(String type) { - return languageSpecificPrimitives.contains(type); - } - - private boolean isLanguageGenericType(String type) { - for (String genericType : languageGenericTypes) { - if (type.startsWith(genericType + "<")) { - return true; - } - } - return false; - } - @Override public void postProcessParameter(CodegenParameter parameter) { super.postProcessParameter(parameter); @@ -505,7 +495,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } /** - * Parse imports + * Parse imports */ private Set parseImports(CodegenModel cm) { Set newImports = new HashSet(); @@ -556,17 +546,26 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @Override public String toApiImport(String name) { + if (importMapping.containsKey(name)) { + return importMapping.get(name); + } return apiPackage() + "/" + toApiFilename(name); } @Override public String toModelFilename(String name) { - return this.convertUsingFileNamingConvention(this.sanitizeName(name)) + modelFileSuffix; + if (importMapping.containsKey(name)) { + return importMapping.get(name); + } + return DEFAULT_IMPORT_PREFIX + this.convertUsingFileNamingConvention(this.sanitizeName(name)) + modelFileSuffix; } @Override public String toModelImport(String name) { - return modelPackage() + "/" + toModelFilename(name); + if (importMapping.containsKey(name)) { + return importMapping.get(name); + } + return modelPackage() + "/" + toModelFilename(name).substring(DEFAULT_IMPORT_PREFIX.length()); } public String getNpmRepository() { @@ -623,6 +622,21 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } } + /** + * Validates that the given string value only contains alpha numeric characters. + * Throws an IllegalArgumentException, if the string contains any other characters. + * + * @param argument The name of the argument being validated. This is only used for displaying an error message. + * @param value The value that is being validated. + */ + private void validateClassPrefixArgument(String argument, String value) { + if (!value.matches(CLASS_NAME_PREFIX_PATTERN)) { + throw new IllegalArgumentException( + String.format(Locale.ROOT, "%s class prefix only allows alphanumeric characters.", argument) + ); + } + } + /** * Validates that the given string value only contains alpha numeric characters. * Throws an IllegalArgumentException, if the string contains any other characters. @@ -669,4 +683,3 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } } - diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index fff5afb332f..30f924fda4c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -107,7 +107,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege supportingFiles.add(new SupportingFile("baseApi.mustache", "", "base.ts")); supportingFiles.add(new SupportingFile("api.mustache", "", "api.ts")); supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.ts")); - supportingFiles.add(new SupportingFile("custom.d.mustache", "", "custom.d.ts")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 9b95974ef61..26b0b6539a9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -90,6 +90,7 @@ public class ModelUtils { * @return schemas a list of used schemas */ public static List getAllUsedSchemas(OpenAPI openAPI) { + Map> childrenMap = getChildrenMap(openAPI); List allUsedSchemas = new ArrayList(); visitOpenAPI(openAPI, (s, t) -> { if (s.get$ref() != null) { @@ -97,6 +98,13 @@ public class ModelUtils { if (!allUsedSchemas.contains(ref)) { allUsedSchemas.add(ref); } + if (childrenMap.containsKey(ref)) { + for (String child : childrenMap.get(ref)) { + if (!allUsedSchemas.contains(child)) { + allUsedSchemas.add(child); + } + } + } } }); return allUsedSchemas; @@ -109,6 +117,7 @@ public class ModelUtils { * @return schemas a list of unused schemas */ public static List getUnusedSchemas(OpenAPI openAPI) { + Map> childrenMap = getChildrenMap(openAPI); List unusedSchemas = new ArrayList(); Map schemas = getSchemas(openAPI); @@ -116,7 +125,11 @@ public class ModelUtils { visitOpenAPI(openAPI, (s, t) -> { if (s.get$ref() != null) { - unusedSchemas.remove(getSimpleRef(s.get$ref())); + String ref = getSimpleRef(s.get$ref()); + unusedSchemas.remove(ref); + if (childrenMap.containsKey(ref)) { + unusedSchemas.removeAll(childrenMap.get(ref)); + } } }); return unusedSchemas; @@ -859,6 +872,18 @@ public class ModelUtils { return null; } + public static Map> getChildrenMap(OpenAPI openAPI) { + Map allSchemas = getSchemas(openAPI); + + Map>> groupedByParent = allSchemas.entrySet().stream() + .filter(entry -> isComposedSchema(entry.getValue())) + .collect(Collectors.groupingBy(entry -> getParentName((ComposedSchema) entry.getValue(), allSchemas))); + + return groupedByParent.entrySet().stream() + .collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue().stream().map(e -> e.getKey()).collect(Collectors.toList()))); + } + + /** * Get the interfaces from the schema (composed) * diff --git a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache index 66d9c572088..1ae6c36f68a 100644 --- a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache @@ -29,6 +29,7 @@ import com.sun.jersey.api.client.WebResource.Builder; import com.sun.jersey.multipart.FormDataMultiPart; import com.sun.jersey.multipart.file.FileDataBodyPart; +import javax.ws.rs.core.Cookie; import javax.ws.rs.core.Response.Status.Family; import javax.ws.rs.core.MediaType; @@ -60,6 +61,7 @@ import {{invokerPackage}}.auth.OAuth; {{>generatedAnnotation}} public class ApiClient { private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String basePath = "{{{basePath}}}"; private boolean debugging = false; private int connectionTimeout = 0; @@ -239,7 +241,7 @@ public class ApiClient { /** * Helper method to set API key value for the first API key authentication. - * @param apiKey API key + * @param apiKey the API key */ public void setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { @@ -250,7 +252,7 @@ public class ApiClient { } throw new RuntimeException("No API key authentication configured!"); } - + /** * Helper method to set API key prefix for the first API key authentication. * @param apiKeyPrefix API key prefix @@ -318,6 +320,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is on @@ -652,12 +666,12 @@ public class ApiClient { return url.toString(); } - private ClientResponse getAPIResponse(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames) throws ApiException { + private ClientResponse getAPIResponse(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames) throws ApiException { if (body != null && !formParams.isEmpty()) { throw new ApiException(500, "Cannot have body and form params"); } - updateParamsForAuth(authNames, queryParams, headerParams); + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final String url = buildUrl(path, queryParams, collectionQueryParams); Builder builder; @@ -676,6 +690,15 @@ public class ApiClient { } } + for (Entry keyValue : cookieParams.entrySet()) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + for (Map.Entry keyValue : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(keyValue.getKey())) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + } + ClientResponse response = null; if ("GET".equals(method)) { @@ -706,6 +729,7 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object - if it is not binary, otherwise null * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -714,9 +738,9 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public T invokeAPI(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + public T invokeAPI(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - ClientResponse response = getAPIResponse(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, accept, contentType, authNames); + ClientResponse response = getAPIResponse(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); statusCode = response.getStatusInfo().getStatusCode(); responseHeaders = response.getHeaders(); @@ -753,12 +777,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams Query parameters * @param headerParams Header parameters + * @param cookieParams Cookie parameters */ - private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/modules/openapi-generator/src/main/resources/Java/CustomInstantDeserializer.mustache b/modules/openapi-generator/src/main/resources/Java/CustomInstantDeserializer.mustache index dbf4d30e117..5ebea810e1d 100644 --- a/modules/openapi-generator/src/main/resources/Java/CustomInstantDeserializer.mustache +++ b/modules/openapi-generator/src/main/resources/Java/CustomInstantDeserializer.mustache @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/modules/openapi-generator/src/main/resources/Java/README.mustache b/modules/openapi-generator/src/main/resources/Java/README.mustache index ff0026651fe..f1bb9f234cd 100644 --- a/modules/openapi-generator/src/main/resources/Java/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/README.mustache @@ -89,11 +89,14 @@ public class {{{classname}}}Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("{{{basePath}}}"); - {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} + {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setApiKey("YOUR API KEY"); diff --git a/modules/openapi-generator/src/main/resources/Java/api.mustache b/modules/openapi-generator/src/main/resources/Java/api.mustache index fa23d312502..11fc64de646 100644 --- a/modules/openapi-generator/src/main/resources/Java/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api.mustache @@ -79,6 +79,7 @@ public class {{classname}} { {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#queryParams}} @@ -89,6 +90,10 @@ public class {{classname}} { localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); {{/headerParams}} + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + {{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}}); {{/formParams}} @@ -107,9 +112,9 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); {{/returnType}}{{^returnType}} - apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); {{/returnType}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache index 3a9d2886266..edc837f486e 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache @@ -36,11 +36,14 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("{{{basePath}}}"); {{#hasAuthMethods}} - {{#authMethods}}{{#isBasic}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setApiKey("YOUR API KEY"); diff --git a/modules/openapi-generator/src/main/resources/Java/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/auth/ApiKeyAuth.mustache index 5af060f1173..991ae235003 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/ApiKeyAuth.mustache @@ -45,7 +45,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -59,6 +59,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/auth/Authentication.mustache index 26174fa3b59..033de98d562 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/Authentication.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/Authentication.mustache @@ -13,6 +13,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/modules/openapi-generator/src/main/resources/Java/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/auth/HttpBasicAuth.mustache index 015e042e171..4d362cbaf54 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/HttpBasicAuth.mustache @@ -41,7 +41,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/auth/HttpBearerAuth.mustache index 1d195865439..322281f8716 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/HttpBearerAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/HttpBearerAuth.mustache @@ -35,7 +35,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/auth/OAuth.mustache index ffc9923d1fe..5cb98e7cb3b 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/OAuth.mustache @@ -20,7 +20,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 70462ccbd8e..2fa65868357 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -136,8 +136,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson_databind_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" + jackson_version = "2.9.10" + jackson_databind_version = "2.9.10" jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache index 0f826eb387b..47e993012f2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache @@ -70,7 +70,7 @@ public class ApiClient { {{/isBasicBasic}} {{/isBasic}} {{#isApiKey}} - auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"); + auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); {{/isApiKey}} {{#isOAuth}} auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiKeyAuth.mustache index 9982cd7fc49..c03fe5c0bc0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/ApiKeyAuth.mustache @@ -36,6 +36,8 @@ public class ApiKeyAuth implements RequestInterceptor { template.query(paramName, apiKey); } else if ("header".equals(location)) { template.header(paramName, apiKey); + } else if ("cookie".equals(location)) { + template.header("Cookie", String.format("%s=%s", paramName, apiKey)); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index 34a2bb98015..e70e3e2945f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -121,10 +121,10 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" - jackson_databind_version = "2.9.10" + jackson_databind_version = "2.9.10.1" jackson_databind_nullable_version = "0.2.0" {{#threetenbp}} - threepane_version = "2.6.4" + jackson_threetenbp_version = "2.9.10" {{/threetenbp}} feign_version = "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" feign_form_version = "2.1.0" @@ -150,7 +150,7 @@ dependencies { compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} {{#threetenbp}} - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threepane_version" + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" {{/threetenbp}} compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" compile "com.brsanthu:migbase64:2.2" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 04091222022..61273efb773 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -16,9 +16,9 @@ lazy val root = (project in file(".")). "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.9.9" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.9.10" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index ef60c22df43..7910027eb91 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -316,9 +316,9 @@ 2.1.0 2.9.10 0.2.0 - 2.9.10 + 2.9.10.1 {{#threetenbp}} - 2.6.4 + 2.9.10 {{/threetenbp}} 4.12 1.0.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index d42c3e13899..9c8d7a8d30e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -128,7 +128,7 @@ ext { jodatime_version = "2.9.9" junit_version = "4.12" {{#threetenbp}} - jackson_threeten_version = "2.6.4" + jackson_threeten_version = "2.9.10" {{/threetenbp}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache index 3dea3928279..2c1ff450e94 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache @@ -16,16 +16,16 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", {{#withXml}} - "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.9" % "compile", + "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.10" % "compile", {{/withXml}} {{#joda}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", {{/joda}} {{#java8}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", {{/java8}} {{#threetenbp}} - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{/threetenbp}} "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache index 8bafe1ea9a4..7be1da91a4e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache @@ -313,7 +313,7 @@ 2.9.9 {{/joda}} {{#threetenbp}} - 2.6.4 + 2.9.10 {{/threetenbp}} 1.0.0 4.12 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 4d2c3e21b61..0aa3683cf35 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -62,6 +62,7 @@ import {{invokerPackage}}.auth.OAuth; {{>generatedAnnotation}} public class ApiClient { protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); protected String basePath = "{{{basePath}}}"; protected boolean debugging = false; protected int connectionTimeout = 0; @@ -246,6 +247,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is switched on @@ -316,7 +329,7 @@ public class ApiClient { public int getReadTimeout() { return readTimeout; } - + /** * Set the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and @@ -662,6 +675,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -670,8 +684,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -694,6 +708,13 @@ public class ApiClient { } } + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + for (Entry entry : defaultHeaderMap.entrySet()) { String key = entry.getKey(); if (!headerParams.containsKey(key)) { @@ -819,12 +840,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index 89131a0f943..f3e27a079c2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -121,6 +121,7 @@ public class {{classname}} { // query params {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#queryParams}} @@ -131,6 +132,10 @@ public class {{classname}} { localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); {{/headerParams}} + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + {{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}}); {{/formParams}} @@ -149,9 +154,9 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); {{/returnType}}{{^returnType}} - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); {{/returnType}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index c86178e7d04..ec3b383eea0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -132,7 +132,7 @@ ext { {{/supportJava6}} junit_version = "4.12" {{#threetenbp}} - threetenbp_version = "2.6.4" + threetenbp_version = "2.9.10" {{/threetenbp}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index ef2e32af36e..e31be933919 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -17,13 +17,13 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", {{#joda}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", {{/joda}} {{#java8}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", {{/java8}} {{#threetenbp}} - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{/threetenbp}} {{^java8}} "com.brsanthu" % "migbase64" % "2.2", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 621228c2a7a..31a1843080e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -364,7 +364,7 @@ 2.9.10 0.2.0 {{#threetenbp}} - 2.6.4 + 2.9.10 {{/threetenbp}} 1.0.0 4.12 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index 682bf945069..3856ddf8c19 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -4,6 +4,7 @@ package {{invokerPackage}}; import okhttp3.*; import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; import okio.BufferedSink; @@ -65,6 +66,7 @@ public class ApiClient { private String basePath = "{{{basePath}}}"; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String tempFolderPath = null; private Map authentications; @@ -92,7 +94,7 @@ public class ApiClient { // Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -442,6 +444,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @@ -1069,14 +1083,15 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, callback); + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1090,18 +1105,20 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); String contentType = (String) headerParams.get("Content-Type"); // ensuring a default content type @@ -1196,8 +1213,8 @@ public class ApiClient { /** * Set header parameters to the request builder, including default headers. * - * @param headerParams Header parameters in the ofrm of Map - * @param reqBuilder Reqeust.Builder + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder */ public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { for (Entry param : headerParams.entrySet()) { @@ -1210,20 +1227,38 @@ public class ApiClient { } } + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } @@ -1306,8 +1341,8 @@ public class ApiClient { */ private void applySslSettings() { try { - TrustManager[] trustManagers = null; - HostnameVerifier hostnameVerifier = null; + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; if (!verifyingSsl) { trustManagers = new TrustManager[]{ new X509TrustManager() { @@ -1325,40 +1360,42 @@ public class ApiClient { } } }; - SSLContext sslContext = SSLContext.getInstance("TLS"); hostnameVerifier = new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }; - } else if (sslCaCert != null) { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - trustManagerFactory.init(caKeyStore); - trustManagers = trustManagerFactory.getTrustManagers(); - } - - if (keyManagers != null || trustManagers != null) { - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]).build(); } else { - httpClient = httpClient.newBuilder().sslSocketFactory(null, (X509TrustManager) trustManagers[0]).build(); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; } - httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build(); + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache index 07636f62a4e..e459ad31713 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache @@ -90,11 +90,14 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("{{{basePath}}}"); {{#hasAuthMethods}} - {{#authMethods}}{{#isBasic}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setApiKey("YOUR API KEY"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 26015967b40..98bcd3d4654 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -111,6 +111,13 @@ public class {{classname}} { } {{/headerParams}} + {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); + {{#cookieParams}} + if ({{paramName}} != null) { + localVarCookieParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/cookieParams}} {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#formParams}} if ({{paramName}} != null) { @@ -133,7 +140,7 @@ public class {{classname}} { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; - return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } {{#isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache index 720b4d3c5ee..c7ce067ce13 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache @@ -34,11 +34,14 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("{{{basePath}}}"); {{#hasAuthMethods}} - {{#authMethods}}{{#isBasic}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setApiKey("YOUR API KEY"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/HttpBasicAuth.mustache index 6356e227a1e..9cff50a7475 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/HttpBasicAuth.mustache @@ -32,7 +32,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache index d3f6d90abba..94f1d6afcf9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -169,7 +169,7 @@ public class RetryingOAuth extends OAuth implements Interceptor { // Applying authorization to parameters is performed in the retryingIntercept method @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { // No implementation necessary } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index d6ae8e31461..fbf57ba7796 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -140,7 +140,7 @@ dependencies { compile 'joda-time:joda-time:2.9.9' {{/joda}} {{#threetenbp}} - compile 'org.threeten:threetenbp:1.3.5' + compile 'org.threeten:threetenbp:1.4.0' {{/threetenbp}} testCompile 'junit:junit:4.12' } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index e1c68a17514..4d768393264 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "joda-time" % "joda-time" % "2.9.9" % "compile", {{/joda}} {{#threetenbp}} - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index 759b9fe8249..cbcdd78f974 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -316,7 +316,7 @@ 2.9.9 {{/joda}} {{#threetenbp}} - 1.3.8 + 1.4.0 {{/threetenbp}} 1.0.0 1.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index 726c343301e..c40c9c3eb92 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -99,8 +99,8 @@ ext { rest_assured_version = "4.0.0" junit_version = "4.12" {{#jackson}} - jackson_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson_databind_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" + jackson_version = "2.9.10" + jackson_databind_version = "2.9.10" jackson_databind_nullable_version = 0.2.0 {{/jackson}} {{#gson}} @@ -111,7 +111,7 @@ ext { jodatime_version = "2.9.9" {{/joda}} {{#threetenbp}} - threetenbp_version = "1.3.8" + threetenbp_version = "1.4.0" {{/threetenbp}} okio_version = "1.13.0" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache index 5f62ab21481..d8214467ae2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache @@ -24,7 +24,7 @@ lazy val root = (project in file(".")). "joda-time" % "joda-time" % "2.9.9" % "compile", {{/joda}} {{#threetenbp}} - "org.threeten" % "threetenbp" % "1.3.8" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "com.squareup.okio" % "okio" % "1.13.0" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache index 383403811b8..330fd660725 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache @@ -320,14 +320,14 @@ 2.9.9 {{/joda}} {{#threetenbp}} - 1.3.8 + 1.4.0 {{/threetenbp}} {{#jackson}} - 2.9.9 - 2.9.9 + 2.9.10 + 2.9.10 0.2.0 {{#threetenbp}} - 2.6.4 + 2.9.10 {{/threetenbp}} {{/jackson}} 1.13.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache index ca672da4998..16ec4c4508f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache @@ -50,6 +50,7 @@ import {{invokerPackage}}.auth.OAuth; {{>generatedAnnotation}} public class ApiClient { private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String basePath = "{{{basePath}}}"; private boolean debugging = false; @@ -82,7 +83,7 @@ public class ApiClient { authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -611,6 +612,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -619,8 +621,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException if the invocation failed */ - public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -652,6 +654,22 @@ public class ApiClient { } } + for (Entry cookieParamsEntry : cookieParams.entrySet()) { + String value = cookieParamsEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(cookieParamsEntry.getKey(), value); + } + } + + for (Entry defaultCookieEntry: defaultHeaderMap.entrySet()) { + if (!cookieParams.containsKey(defaultCookieEntry.getKey())) { + String value = defaultCookieEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(defaultCookieEntry.getKey(), value); + } + } + } + Entity entity = serialize(body, formParams, contentType); Response response = null; @@ -734,11 +752,11 @@ public class ApiClient { * * @param authNames The authentications to apply */ - private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache index e13ddbc9e16..fcb2268a100 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache @@ -71,6 +71,7 @@ public class {{classname}} { // query params {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#queryParams}} @@ -81,6 +82,10 @@ public class {{classname}} { localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); {{/headerParams}} + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + {{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}}); {{/formParams}} @@ -99,9 +104,9 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); {{/returnType}}{{^returnType}} - apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); {{/returnType}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 930ae737fdc..e45659de524 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -122,7 +122,7 @@ ext { jackson_version = "2.9.10" jackson_databind_version = "2.9.10" jackson_databind_nullable_version = "0.2.0" - threetenbp_version = "2.6.4" + threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" {{^java8}} jodatime_version = "2.9.9" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 0af339a0da6..bcedcaec343 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -16,12 +16,12 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{#java8}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", {{/java8}} {{^java8}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "joda-time" % "joda-time" % "2.9.9" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index 4318c37628a..1a12889b965 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -297,7 +297,7 @@ 2.9.10 2.9.10 0.2.0 - 2.6.4 + 2.9.10 {{^java8}} 2.9.9 {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache index df21df17b02..5abf07fc02c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache @@ -92,6 +92,7 @@ public class ApiClient { private boolean debugging = false; private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); private String basePath = "{{basePath}}"; @@ -280,6 +281,21 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + public void setDebugging(boolean debugging) { List currentInterceptors = this.restTemplate.getInterceptors(); if(debugging) { @@ -556,6 +572,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -563,8 +580,8 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return ResponseEntity<T> The response of the chosen type */ - public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); if (queryParams != null) { @@ -600,6 +617,8 @@ public class ApiClient { addHeadersToRequest(headerParams, requestBuilder); addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); RequestEntity requestEntity = requestBuilder.body(selectBody(body, formParams, contentType)); @@ -629,6 +648,29 @@ public class ApiClient { } } + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, BodyBuilder requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + private String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + for (String value : entry.getValue()) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + /** * Build the RestTemplate used to make HTTP requests. * @return RestTemplate @@ -668,13 +710,13 @@ public class ApiClient { * @param queryParams The query parameters * @param headerParams The header parameters */ - private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams) { + private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RestClientException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index 61a0d527204..64655e429d8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -115,6 +115,7 @@ public class {{classname}} { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap();{{#hasQueryParams}} {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{#hasMore}} @@ -122,7 +123,11 @@ public class {{classname}} { {{#headerParams}}if ({{paramName}} != null) headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{#hasMore}} - {{/hasMore}}{{/headerParams}}{{/hasHeaderParams}}{{#hasFormParams}} + {{/hasMore}}{{/headerParams}}{{/hasHeaderParams}}{{#hasCookieParams}} + + {{#cookieParams}}if ({{paramName}} != null) + cookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{#hasMore}} + {{/hasMore}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}} {{#formParams}}if ({{paramName}} != null) formParams.add("{{baseName}}", {{#isFile}}new FileSystemResource({{paramName}}){{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{#hasMore}} @@ -140,7 +145,7 @@ public class {{classname}} { String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; {{#returnType}}ParameterizedTypeReference<{{{returnType}}}> returnType = new ParameterizedTypeReference<{{{returnType}}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};{{/returnType}} - return apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/ApiKeyAuth.mustache index 8b8c40fde75..857403b27cf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/ApiKeyAuth.mustache @@ -41,7 +41,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (apiKey == null) { return; } @@ -55,6 +55,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(paramName, value); } else if (location.equals("header")) { headerParams.add(paramName, value); - } + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/Authentication.mustache index 586de70836a..8e53c2ba08e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/Authentication.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/Authentication.mustache @@ -4,10 +4,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; public interface Authentication { - /** + /** * Apply authentication settings to header and / or query parameters. - * @param queryParams The query parameters for the request + * @param queryParams The query parameters for the request * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request */ - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBasicAuth.mustache index 5f535b3698a..5b07cb907bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBasicAuth.mustache @@ -29,7 +29,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (username == null && password == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBearerAuth.mustache index 0426b7a6984..1d1610c61c4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBearerAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/HttpBearerAuth.mustache @@ -25,7 +25,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (bearerToken == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/OAuth.mustache index fbb2f7f9c72..7889f1582de 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/auth/OAuth.mustache @@ -16,7 +16,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (accessToken != null) { headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 06700890574..7601a8180d1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -127,7 +127,7 @@ ext { jodatime_version = "2.9.9" junit_version = "4.12" {{#threetenbp}} - jackson_threeten_version = "2.6.4" + jackson_threeten_version = "2.9.10" {{/threetenbp}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index c48a68e347a..a717eb44127 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -309,14 +309,14 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.9 - 2.9.9 + 2.9.10 + 2.9.10 0.2.0 {{#joda}} 2.9.9 {{/joda}} {{#threetenbp}} - 2.6.4 + 2.9.10 {{/threetenbp}} 1.0.0 4.12 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/ApiClient.mustache index c3fd7802393..a4a99fea9ee 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/ApiClient.mustache @@ -70,7 +70,7 @@ public class ApiClient { {{/isBasicBasic}} {{/isBasic}} {{#isApiKey}} - auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"); + auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); {{/isApiKey}} {{#isOAuth}} auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); @@ -152,7 +152,7 @@ public class ApiClient { public S createService(Class serviceClass) { return adapterBuilder.build().create(serviceClass); - + } /** @@ -246,7 +246,7 @@ public class ApiClient { } } } - + /** * Helper method to configure the oauth accessCode/implicit flow parameters * @param clientId Client ID @@ -268,7 +268,7 @@ public class ApiClient { } } } - + /** * Configures a listener which is notified when a new access token is received. * @param accessTokenListener Access token listener @@ -316,7 +316,7 @@ public class ApiClient { public OkHttpClient getOkClient() { return okClient; } - + public void addAuthsToOkClient(OkHttpClient okClient) { for(Interceptor apiAuthorization : apiAuthorizations.values()) { okClient.interceptors().add(apiAuthorization); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/ApiKeyAuth.mustache index f6a86f22ab4..69205bb2083 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/ApiKeyAuth.mustache @@ -46,7 +46,7 @@ public class ApiKeyAuth implements Interceptor { if (newQuery == null) { newQuery = paramValue; } else { - newQuery += "&" + paramValue; + newQuery += "&" + paramValue; } URI newUri; @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index 3927003a314..a3c7c226f06 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -114,7 +114,7 @@ ext { junit_version = "4.12" jodatime_version = "2.9.3" {{#threetenbp}} - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" {{/threetenbp}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache index 9d5df5e223c..6afa18db865 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "joda-time" % "joda-time" % "2.9.3" % "compile", {{#threetenbp}} - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache index 5e91585eedc..73d9b4d565a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache @@ -276,7 +276,7 @@ 2.7.5 2.9.9 {{#threetenbp}} - 1.3.5 + 1.4.0 {{/threetenbp}} 1.0.1 1.0.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache index 40ab42d2efe..88f0a67004c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache @@ -71,7 +71,7 @@ public class ApiClient { auth = new HttpBearerAuth("{{scheme}}"); {{/isBasicBasic}}{{/isBasic}} {{#isApiKey}} - auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"); + auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); {{/isApiKey}} {{#isOAuth}} auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/ApiKeyAuth.mustache index 2f4bae3dd02..bcc62b284a5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/ApiKeyAuth.mustache @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 85aa12d6cca..e7f778ba5a0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -149,7 +149,7 @@ ext { jodatime_version = "2.9.9" {{/joda}} {{#threetenbp}} - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" {{/threetenbp}} json_fire_version = "1.8.0" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index 78f7e5786af..c6fc88aa0aa 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -50,7 +50,7 @@ lazy val root = (project in file(".")). "joda-time" % "joda-time" % "2.9.9" % "compile", {{/joda}} {{#threetenbp}} - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache index 5652db326b5..220d896533c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play-common/auth/ApiKeyAuth.mustache @@ -48,7 +48,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -62,6 +62,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/ApiClient.mustache index 2395426ab2c..2c1f1f7bbe6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/ApiClient.mustache @@ -45,7 +45,7 @@ public class ApiClient { authentications = new HashMap<{{#supportJava6}}String, Authentication{{/supportJava6}}>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} // authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -61,13 +61,14 @@ public class ApiClient { } Map extraHeaders = new HashMap<{{#supportJava6}}String, String{{/supportJava6}}>(); + Map extraCookies = new HashMap<{{#supportJava6}}String, String{{/supportJava6}}>(); List extraQueryParams = new ArrayList<{{#supportJava6}}Pair{{/supportJava6}}>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } ObjectMapper mapper = Json.mapper(); @@ -78,7 +79,7 @@ public class ApiClient { .baseUrl(basePath) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(JacksonConverterFactory.create(mapper)) - .callFactory(new Play24CallFactory(wsClient, extraHeaders, extraQueryParams)) + .callFactory(new Play24CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) .addCallAdapterFactory(new Play24CallAdapterFactory()) .build() .create(serviceClass); @@ -139,5 +140,3 @@ public class ApiClient { } - - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallFactory.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallFactory.mustache index 5572ac47619..344fadd2e3e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallFactory.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallFactory.mustache @@ -7,6 +7,7 @@ import play.libs.F; import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; +import play.libs.ws.WSCookie; import java.io.IOException; import java.net.MalformedURLException; @@ -29,6 +30,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); @@ -37,10 +41,12 @@ public class Play24CallFactory implements okhttp3.Call.Factory { } public Play24CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -51,6 +57,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -130,6 +139,7 @@ public class Play24CallFactory implements okhttp3.Call.Factory { try { wsRequest = wsClient.url(request.url().uri().toString()); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -149,6 +159,19 @@ public class Play24CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + private void addBody(WSRequest wsRequest) throws IOException { Buffer buffer = new Buffer(); request.body().writeTo(buffer); @@ -186,6 +209,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } builder.protocol(Protocol.HTTP_1_1); return builder.build(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/ApiClient.mustache index 221d52c4e9b..90f439091cc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/ApiClient.mustache @@ -44,7 +44,7 @@ public class ApiClient { // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<{{#supportJava6}}String, Authentication{{/supportJava6}}>();{{#authMethods}}{{#isBasic}} // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"query"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -60,13 +60,14 @@ public class ApiClient { } Map extraHeaders = new HashMap<{{#supportJava6}}String, String{{/supportJava6}}>(); + Map extraCookies = new HashMap<{{#supportJava6}}String, String{{/supportJava6}}>(); List extraQueryParams = new ArrayList<{{#supportJava6}}Pair{{/supportJava6}}>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } ObjectMapper mapper = Json.mapper(); @@ -77,7 +78,7 @@ public class ApiClient { .baseUrl(basePath) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(JacksonConverterFactory.create(mapper)) - .callFactory(new Play25CallFactory(wsClient, extraHeaders, extraQueryParams)) + .callFactory(new Play25CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) .addCallAdapterFactory(new Play25CallAdapterFactory()) .build() .create(serviceClass); @@ -138,5 +139,3 @@ public class ApiClient { } - - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallFactory.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallFactory.mustache index fd0057a0e0b..a9f19474f67 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallFactory.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallFactory.mustache @@ -9,6 +9,7 @@ import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; import java.io.IOException; import java.net.MalformedURLException; @@ -32,9 +33,12 @@ public class Play25CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); - + /** Filters (interceptors) */ private List filters = new ArrayList<>(); @@ -48,10 +52,12 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } public Play25CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -62,6 +68,9 @@ public class Play25CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -143,6 +152,7 @@ public class Play25CallFactory implements okhttp3.Call.Factory { try { wsRequest = wsClient.url(request.url().uri().toString()); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -163,6 +173,19 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + private void addBody(WSRequest wsRequest) throws IOException { Buffer buffer = new Buffer(); request.body().writeTo(buffer); @@ -198,12 +221,16 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } }); - + for (Map.Entry> entry : r.getAllHeaders().entrySet()) { for (String value : entry.getValue()) { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } + builder.protocol(Protocol.HTTP_1_1); return builder.build(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/ApiClient.mustache index 166fb088019..1346ae85694 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/ApiClient.mustache @@ -58,7 +58,7 @@ public class ApiClient { // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>();{{#authMethods}}{{#isBasic}} // authentications.put("{{name}}", new HttpBasicAuth());{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} // authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -73,17 +73,18 @@ public class ApiClient { } Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); List extraQueryParams = new ArrayList<>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } if (callFactory == null) { - callFactory = new Play26CallFactory(wsClient, extraHeaders, extraQueryParams); + callFactory = new Play26CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams); } if (callAdapterFactory == null) { callAdapterFactory = new Play26CallAdapterFactory(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/Play26CallFactory.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/Play26CallFactory.mustache index b46b3af0eda..f65c921a752 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/Play26CallFactory.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/Play26CallFactory.mustache @@ -9,6 +9,8 @@ import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; +import play.libs.ws.WSCookieBuilder; import java.io.IOException; import java.net.MalformedURLException; @@ -32,6 +34,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); @@ -51,10 +56,12 @@ public class Play26CallFactory implements okhttp3.Call.Factory { } public Play26CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -70,6 +77,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -160,6 +170,7 @@ public class Play26CallFactory implements okhttp3.Call.Factory { wsRequest.addQueryParameter(queryParam, url.queryParameter(queryParam)); }); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -180,6 +191,32 @@ public class Play26CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + for (final WSCookie cookie : getCookies()) { + wsRequest.addCookie(cookie); + } + } + + List getCookies() { + final List cookies = new ArrayList<>(); + for (final String cookieString : request.headers("Cookie")) { + for (String cookie : cookieString.split(";")) { + cookie = cookie.trim(); + final String[] nameAndValue = cookie.split("="); + if (nameAndValue.length != 2) { + continue; + } + cookies.add( + new WSCookieBuilder() + .setName(nameAndValue[0]) + .setValue(nameAndValue[1]) + .build() + ); + } + } + return cookies; + } + private void addBody(WSRequest wsRequest) throws IOException { MediaType mediaType = request.body().contentType(); if (mediaType != null) { @@ -220,6 +257,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } builder.message(r.getStatusText()); builder.protocol(Protocol.HTTP_1_1); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index 8bca88942d3..d32445d02f1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -401,7 +401,7 @@ 2.9.9 {{/joda}} {{#threetenbp}} - 1.3.8 + 1.4.0 {{/threetenbp}} 1.0.1 4.12 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache index 571a3e4e63f..bc19a925308 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache @@ -49,6 +49,7 @@ public class ApiClient { private final String identifier; private MultiMap defaultHeaders = MultiMap.caseInsensitiveMultiMap(); + private MultiMap defaultCookies = MultiMap.caseInsensitiveMultiMap(); private Map authentications; private String basePath = "{{{basePath}}}"; private DateFormat dateFormat; @@ -85,7 +86,7 @@ public class ApiClient { this.authentications = new HashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. this.authentications = Collections.unmodifiableMap(authentications); @@ -147,6 +148,15 @@ public class ApiClient { return this; } + public MultiMap getDefaultCookies() { + return defaultHeaders; + } + + public ApiClient addDefaultCookie(String key, String value) { + defaultCookies.add(key, value); + return this; + } + /** * Get authentications (key: authentication name, value: authentication). * @@ -431,6 +441,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accepts The request's Accept headers * @param contentTypes The request's Content-Type headers @@ -439,10 +450,10 @@ public class ApiClient { * @param resultHandler The asynchronous response handler */ public void invokeAPI(String path, String method, List queryParams, Object body, MultiMap headerParams, - Map formParams, String[] accepts, String[] contentTypes, String[] authNames, + MultiMap cookieParams, Map formParams, String[] accepts, String[] contentTypes, String[] authNames, TypeReference returnType, Handler> resultHandler) { - updateParamsForAuth(authNames, queryParams, headerParams); + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); if (accepts != null && accepts.length > 0) { headerParams.add(HttpHeaders.ACCEPT, selectHeaderAccept(accepts)); @@ -477,6 +488,9 @@ public class ApiClient { } }); + final MultiMap cookies = MultiMap.caseInsensitiveMultiMap().addAll(cookieParams).addAll(defaultCookies); + request.putHeader("Cookie", buildCookieHeader(cookies)); + Handler>> responseHandler = buildResponseHandler(returnType, resultHandler); if (body != null) { sendBody(request, responseHandler, body); @@ -489,6 +503,18 @@ public class ApiClient { } } + private String buildCookieHeader(MultiMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry entry : cookies.entries()) { + if (entry.getValue() != null) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + /** * Sanitize filename by removing path. * e.g. ../../sun.gif becomes sun.gif @@ -619,11 +645,11 @@ public class ApiClient { * * @param authNames The authentications to apply */ - protected void updateParamsForAuth(String[] authNames, List queryParams, MultiMap headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, MultiMap headerParams, MultiMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache index 2cdac042865..5ea569f4ab2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache @@ -72,6 +72,12 @@ public class {{classname}}Impl implements {{classname}} { localVarHeaderParams.add("{{baseName}}", apiClient.parameterToString({{paramName}})); {{/headerParams}} + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + {{#cookieParams}}if ({{paramName}} != null) + localVarCookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}})); + {{/cookieParams}} + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -83,8 +89,8 @@ public class {{classname}}Impl implements {{classname}} { String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; {{#returnType}} TypeReference<{{{returnType}}}> localVarReturnType = new TypeReference<{{{returnType}}}>() {}; - apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler);{{/returnType}}{{^returnType}} - apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler);{{/returnType}} + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler);{{/returnType}}{{^returnType}} + apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler);{{/returnType}} } {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/ApiKeyAuth.mustache index 43b1866e460..fadbd33e565 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/ApiKeyAuth.mustache @@ -45,7 +45,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (apiKey == null) { return; } @@ -59,6 +59,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.add(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.add(paramName, value); } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/Authentication.mustache index 5dccb93f2ac..9d546c30058 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/Authentication.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/Authentication.mustache @@ -13,6 +13,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, MultiMap headerParams); + void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBasicAuth.mustache index 43862b508b6..9bca5090a99 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBasicAuth.mustache @@ -30,7 +30,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (username == null && password == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBearerAuth.mustache index 3dfc23800a6..208eedb7122 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBearerAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/HttpBearerAuth.mustache @@ -26,7 +26,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (bearerToken == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/OAuth.mustache index f3c5b34ee11..5bebabf90a7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/auth/OAuth.mustache @@ -20,7 +20,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (accessToken != null) { headerParams.add("Authorization", "Bearer " + accessToken); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 20aa961eaaf..68dce22f06a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -28,8 +28,8 @@ task execute(type:JavaExec) { ext { swagger_annotations_version = "1.5.21" - jackson_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson_databind_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" + jackson_version = "2.9.10" + jackson_databind_version = "2.9.10" vertx_version = "3.4.2" junit_version = "4.12" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache index 17d2c1261a9..df558861387 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache @@ -289,8 +289,8 @@ UTF-8 3.4.2 1.5.22 - {{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}} - {{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}} + 2.9.10 + 2.9.10 0.2.0 4.12 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache index 2e08f6da5f2..fe6c6d14cb1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache @@ -82,6 +82,7 @@ public class ApiClient { } private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); private String basePath = "{{basePath}}"; @@ -129,7 +130,7 @@ public class ApiClient { authentications = new HashMap();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} - authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} + authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -298,6 +299,21 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + /** * Get the date format used to parse/format date parameters. * @return DateFormat format @@ -507,8 +523,8 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return The response body in chosen type */ - public Mono invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, formParams, accept, contentType, authNames); + public Mono invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); return requestBuilder.retrieve().bodyToMono(returnType); } @@ -528,13 +544,13 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return The response body in chosen type */ - public Flux invokeFluxAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, formParams, accept, contentType, authNames); + public Flux invokeFluxAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); return requestBuilder.retrieve().bodyToFlux(returnType); } - private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames) { - updateParamsForAuth(authNames, queryParams, headerParams); + private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames) { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); if (queryParams != null) { @@ -563,6 +579,8 @@ public class ApiClient { addHeadersToRequest(headerParams, requestBuilder); addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); requestBuilder.body(selectBody(body, formParams, contentType)); return requestBuilder; @@ -584,20 +602,37 @@ public class ApiClient { } } + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, WebClient.RequestBodySpec requestBuilder) { + for (Entry> entry : cookies.entrySet()) { + List values = entry.getValue(); + for(String value : values) { + if (value != null) { + requestBuilder.cookie(entry.getKey(), value); + } + } + } + } + /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams The query parameters * @param headerParams The header parameters + * @param cookieParams the cookie parameters */ - private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams) { + private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RestClientException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache index 33da1d14576..9d7c243fe07 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache @@ -72,18 +72,22 @@ public class {{classname}} { final Map uriVariables = new HashMap();{{#pathParams}} uriVariables.put("{{baseName}}", {{{paramName}}});{{/pathParams}}{{/hasPathParams}} String path = UriComponentsBuilder.fromPath("{{{path}}}"){{#hasPathParams}}.buildAndExpand(uriVariables){{/hasPathParams}}{{^hasPathParams}}.build(){{/hasPathParams}}.toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap();{{#hasQueryParams}} - + {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{#hasMore}} {{/hasMore}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}} - + {{#headerParams}}if ({{paramName}} != null) headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{#hasMore}} - {{/hasMore}}{{/headerParams}}{{/hasHeaderParams}}{{#hasFormParams}} - + {{/hasMore}}{{/headerParams}}{{/hasHeaderParams}}{{#hasCookieParams}} + + {{#cookieParams}}cookieParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{#hasMore}} + {{/hasMore}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}} + {{#formParams}}if ({{paramName}} != null) formParams.add("{{baseName}}", {{#isFile}}new FileSystemResource({{paramName}}){{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{#hasMore}} {{/hasMore}}{{/formParams}}{{/hasFormParams}} @@ -100,7 +104,7 @@ public class {{classname}} { String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; {{#returnType}}ParameterizedTypeReference<{{#isListContainer}}{{{returnBaseType}}}{{/isListContainer}}{{^isListContainer}}{{{returnType}}}{{/isListContainer}}> returnType = new ParameterizedTypeReference<{{#isListContainer}}{{{returnBaseType}}}{{/isListContainer}}{{^isListContainer}}{{{returnType}}}{{/isListContainer}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference returnType = new ParameterizedTypeReference() {};{{/returnType}} - return apiClient.{{#isListContainer}}invokeFluxAPI{{/isListContainer}}{{^isListContainer}}invokeAPI{{/isListContainer}}(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.{{#isListContainer}}invokeFluxAPI{{/isListContainer}}{{^isListContainer}}invokeAPI{{/isListContainer}}(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/ApiKeyAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/ApiKeyAuth.mustache index 8b8c40fde75..857403b27cf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/ApiKeyAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/ApiKeyAuth.mustache @@ -41,7 +41,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (apiKey == null) { return; } @@ -55,6 +55,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(paramName, value); } else if (location.equals("header")) { headerParams.add(paramName, value); - } + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/Authentication.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/Authentication.mustache index 586de70836a..8e53c2ba08e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/Authentication.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/Authentication.mustache @@ -4,10 +4,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; public interface Authentication { - /** + /** * Apply authentication settings to header and / or query parameters. - * @param queryParams The query parameters for the request + * @param queryParams The query parameters for the request * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request */ - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBasicAuth.mustache index 5f535b3698a..5b07cb907bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBasicAuth.mustache @@ -29,7 +29,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (username == null && password == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBearerAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBearerAuth.mustache index 67d5c6c56d0..027c128f474 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBearerAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/HttpBearerAuth.mustache @@ -25,7 +25,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (bearerToken == null) { return; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/OAuth.mustache index fbb2f7f9c72..7889f1582de 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/auth/OAuth.mustache @@ -16,7 +16,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (accessToken != null) { headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index c8651f58c58..4b11dd276bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -144,7 +144,7 @@ 1.5.22 5.0.7.RELEASE 2.9.10 - 2.9.10 + 2.9.10.1 0.2.0 4.12 3.1.8.RELEASE diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index 27bbed28420..1ec15aa3984 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -182,6 +182,10 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} +{{#vendorExtensions.isJacksonOptionalNullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.isJacksonOptionalNullable}} {{^vendorExtensions.isJacksonOptionalNullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.isJacksonOptionalNullable}} public {{{datatypeWithEnum}}} {{getter}}() { {{#vendorExtensions.isJacksonOptionalNullable}} @@ -202,16 +206,15 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { return {{name}}; } - {{/vendorExtensions.isJacksonOptionalNullable}} - - {{^isReadOnly}} - {{#vendorExtensions.isJacksonOptionalNullable}} + {{/vendorExtensions.isJacksonOptionalNullable}}{{#vendorExtensions.isJacksonOptionalNullable}} @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - public void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} this.{{name}} = {{name}}; } {{/vendorExtensions.isJacksonOptionalNullable}} + {{^isReadOnly}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.isJacksonOptionalNullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); diff --git a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache index 38a52e44eb5..313e61ba7e6 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache @@ -1,5 +1,7 @@ # {{classname}} +{{#description}}{{&description}} +{{/description}} ## Properties Name | Type | Description | Notes diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache index ef608ee6a16..08c75ecbaaa 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache @@ -20,4 +20,12 @@ ENV AB_ENABLED=jmx_exporter COPY target/lib/* /deployments/lib/ COPY target/*-runner.jar /deployments/app.jar EXPOSE 8080 + +# run with user 1001 and be prepared for be running in OpenShift too +RUN adduser -G root --no-create-home --disabled-password 1001 \ + && chown -R 1001 /deployments \ + && chmod -R "g+rwX" /deployments \ + && chown -R 1001:root /deployments +USER 1001 + ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache index d92dff6d7cd..a81ab0fbed0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache @@ -9,9 +9,11 @@ UTF-8 2.22.0 - 0.23.2 - UTF-8 + true + 0.25.0 + 3.8.1 1.8 + UTF-8 1.8 @@ -78,6 +80,10 @@ + + maven-compiler-plugin + ${compiler-plugin.version} + maven-surefire-plugin ${surefire-plugin.version} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 067c32dbbdf..7b3cc1f9465 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -115,7 +115,7 @@ public interface {{classname}} { } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}ServerWebExchange exchange{{/reactive}}) { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}ServerWebExchange exchange{{/reactive}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 15a51ceb99e..a055cb86d5a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -52,7 +52,7 @@ public interface {{classname}}Delegate { */ {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#reactive}}{{#hasParams}}, - {{/hasParams}}ServerWebExchange exchange{{/reactive}}){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { + {{/hasParams}}ServerWebExchange exchange{{/reactive}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{>methodBody}} }{{/jdk8-default-interface}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache index 6421924b76d..06de2c6fcbc 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache @@ -89,7 +89,7 @@ com.github.joschi.jackson jackson-datatype-threetenbp {{^parentOverridden}} - 2.6.4 + 2.9.10 {{/parentOverridden}} {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/README.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/README.mustache new file mode 100644 index 00000000000..4ed2314c893 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/README.mustache @@ -0,0 +1,14 @@ +{{^hideGenerationTimestamp}} +Project generated on : {{generatedDate}} +{{/hideGenerationTimestamp}} + +## Getting Started + +This document assumes you have maven available. + +To build the project using maven, run: +```bash +mvn package && java -jar target/target/java-vertx-web-rx-server-{{artifactVersion}}-fat.jar +``` + +If all builds successfully, the server should run on [http://localhost:8080/](http://localhost:8080/) diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/api.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/api.mustache new file mode 100644 index 00000000000..b43d443c00f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/api.mustache @@ -0,0 +1,19 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import {{invokerPackage}}.ApiResponse; + +import io.reactivex.Single; + +import java.util.List; +import java.util.Map; + +public interface {{classname}} { +{{#operations}} +{{#operation}} + Single> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}},{{/hasMore}}{{/allParams}}); +{{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiHandler.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiHandler.mustache new file mode 100644 index 00000000000..26a64d231a5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiHandler.mustache @@ -0,0 +1,70 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import {{invokerPackage}}.ParameterCast; +import {{invokerPackage}}.ApiException; + +import com.fasterxml.jackson.core.type.TypeReference; +import io.vertx.core.json.Json; +import io.vertx.core.Handler; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.RoutingContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.reactivex.Single; + +import java.util.List; +import java.util.Map; + +public class {{classname}}Handler { + + private static final Logger logger = LoggerFactory.getLogger({{classname}}Handler.class); + private {{classname}} apiImpl = new {{classname}}Impl(); + + public {{classname}}Handler(Map> operationHandlers) { +{{#operations}} +{{#operation}} + operationHandlers.put("{{operationId}}", this::{{operationId}}); +{{/operation}} +{{/operations}} + } +{{#operations}} +{{#operation}} + + private void {{operationId}}(RoutingContext routingContext) { + logger.info("{{operationId}}()"); + HttpServerResponse response = routingContext.response(); + + {{#returnType}}Single{{/returnType}}{{^returnType}}Completable{{/returnType}}.defer( () -> { +{{#allParams}}{{^isBodyParam}}{{>headerParams}}{{>pathParams}}{{>queryParams}}{{>formParams}}{{/isBodyParam}}{{/allParams}} +{{#allParams}} +{{#isBodyParam}} + String jsonString = routingContext.getBodyAsString(); + {{{dataType}}} {{paramName}} = jsonString == null ? null : Json.decodeValue(jsonString, new TypeReference<{{{dataType}}}>(){}); +{{/isBodyParam}} +{{/allParams}} +{{#allParams}} + logger.info("Parameter {{paramName}} is {}", {{paramName}}); +{{/allParams}} + return apiImpl.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + }) + .subscribe( + apiResponse -> { + response.setStatusCode(apiResponse.getStatusCode()) + .end(Json.encodePrettily(apiResponse.getData())); + }, error -> { + if (error instanceof ApiException) { + ApiException apiException = (ApiException) error; + response.setStatusCode(apiException.getStatusCode()).end(apiException.getMessage()); + } else { + response.setStatusCode(500).end(error.getMessage()); + } + }).dispose(); + } + +{{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiImpl.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiImpl.mustache new file mode 100644 index 00000000000..86f61eb0f6c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/apiImpl.mustache @@ -0,0 +1,25 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.ApiException; + +import io.reactivex.Single; + +import java.util.List; +import java.util.Map; + +// Implement this class + +public class {{classname}}Impl implements {{classname}} { +{{#operations}} +{{#operation}} + public Single> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}},{{/hasMore}}{{/allParams}}) { + return Single.error(new ApiException("Not Implemented").setStatusCode(501)); + } + +{{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumClass.mustache new file mode 100644 index 00000000000..0867107d993 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumClass.mustache @@ -0,0 +1,17 @@ + + public enum {{{datatypeWithEnum}}} { + {{#allowableValues}}{{#enumVars}}{{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + + private String value; + + {{{datatypeWithEnum}}}(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return value; + } + } diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache new file mode 100644 index 00000000000..97d8170d5f8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache @@ -0,0 +1,36 @@ +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + */ +public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { + {{#allowableValues}}{{#enumVars}} + {{{name}}}({{{value}}}){{^-last}}, + {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + + private {{{dataType}}} value; + + {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + @JsonValue + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.equals(value)) { + return b; + } + } + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}} + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/formParams.mustache new file mode 100644 index 00000000000..0e5c83e603c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/formParams.mustache @@ -0,0 +1,18 @@ +{{#isFormParam}} +{{^isListContainer}} +{{^isFile}} +{{#isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.toObject(routingContext.request().getFormAttribute("{{baseName}}"), {{dataType}}.class); +{{/isModel}} +{{^isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.to{{dataType}}(routingContext.request().getFormAttribute("{{baseName}}")); +{{/isModel}} +{{/isFile}} +{{#isFile}} + {{{dataType}}} {{paramName}} = routingContext.fileUploads().iterator().next(); +{{/isFile}} +{{/isListContainer}} +{{#isListContainer}} + {{{dataType}}} {{paramName}} = routingContext.request().params().getAll("{{baseName}}"); +{{/isListContainer}} +{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/headerParams.mustache new file mode 100644 index 00000000000..38199231542 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/headerParams.mustache @@ -0,0 +1,13 @@ +{{#isHeaderParam}} +{{^isListContainer}} +{{#isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.toObject(routingContext.request().getHeader("{{baseName}}"), {{dataType}}.class); +{{/isModel}} +{{^isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.to{{dataType}}(routingContext.request().getHeader("{{baseName}}")); +{{/isModel}} +{{/isListContainer}} +{{#isListContainer}} + {{{dataType}}} {{paramName}} = routingContext.request().params().getAll("{{baseName}}"); +{{/isListContainer}} +{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache new file mode 100644 index 00000000000..46f9f77357d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache @@ -0,0 +1,12 @@ +package {{package}}; + +import java.util.Objects; +{{#imports}}import {{import}}; +{{/imports}} +{{#serializableModel}}import java.io.Serializable; +{{/serializableModel}}{{#models}}{{#model}}{{#description}} +/** + * {{description}} + **/ +{{/description}}{{^description}} +{{/description}}{{#isEnum}}{{>enumOuterClass}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}{{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pathParams.mustache new file mode 100644 index 00000000000..7c62bcefc56 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pathParams.mustache @@ -0,0 +1,13 @@ +{{#isPathParam}} +{{^isListContainer}} +{{#isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.toObject(routingContext.pathParams().get("{{baseName}}"), {{dataType}}.class); +{{/isModel}} +{{^isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.to{{dataType}}(routingContext.pathParams().get("{{baseName}}")); +{{/isModel}} +{{/isListContainer}} +{{#isListContainer}} + {{{dataType}}} {{paramName}} = routingContext.request().params().getAll("{{baseName}}"); +{{/isListContainer}} +{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache new file mode 100644 index 00000000000..014ba3e2b43 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache @@ -0,0 +1,71 @@ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { + {{#vars}}{{#isEnum}}{{^isContainer}} + +{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} + +{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} + + public {{classname}} () { + + } + + public {{classname}} ({{#vars}}{{{datatypeWithEnum}}} {{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}) { + {{#vars}} + this.{{name}} = {{name}}; + {{/vars}} + } + + {{#vars}} + {{#vendorExtensions.extraAnnotation}}{{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}} + @JsonProperty("{{baseName}}") + public {{{datatypeWithEnum}}} {{getter}}() { + return {{name}}; + } + public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { + this.{{name}} = {{name}}; + } + + {{/vars}} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + {{classname}} {{classVarName}} = ({{classname}}) o;{{#hasVars}} + return {{#vars}}Objects.equals({{name}}, {{classVarName}}.{{name}}){{#hasMore}} && + {{/hasMore}}{{^hasMore}};{{/hasMore}}{{/vars}}{{/hasVars}}{{^hasVars}} + return true;{{/hasVars}} + } + + @Override + public int hashCode() { + return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{/vars}}sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/queryParams.mustache new file mode 100644 index 00000000000..efb6b55008d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/queryParams.mustache @@ -0,0 +1,13 @@ +{{#isQueryParam}} +{{^isListContainer}} +{{#isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.toObject(routingContext.queryParams().get("{{baseName}}"), {{dataType}}.class); +{{/isModel}} +{{^isModel}} + {{{dataType}}} {{paramName}} = ParameterCast.to{{dataType}}(routingContext.queryParams().get("{{baseName}}")); +{{/isModel}} +{{/isListContainer}} +{{#isListContainer}} + {{{dataType}}} {{paramName}} = routingContext.request().params().getAll("{{baseName}}"); +{{/isListContainer}} +{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiException.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiException.mustache new file mode 100644 index 00000000000..4262b43dacf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiException.mustache @@ -0,0 +1,24 @@ +package {{invokerPackage}}; + +public class ApiException extends RuntimeException { + private final String message; + private Integer statusCode; + + public ApiException(String message) { + this.message = message; + } + + @Override + public String getMessage() { + return message; + } + + public ApiException setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + public Integer getStatusCode() { + return statusCode; + } +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache new file mode 100644 index 00000000000..03d1392de10 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache @@ -0,0 +1,29 @@ +package {{invokerPackage}}; + +public class ApiResponse { + private final T data; + private Integer statusCode; + + public ApiResponse(T data) { + this.data = data; + } + + public ApiResponse() { + this.data = null; + } + + public T getData() { + return data; + } + + public ApiResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + public Integer getStatusCode() { + return statusCode; + } +} + + diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/HttpServerVerticle.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/HttpServerVerticle.mustache new file mode 100644 index 00000000000..e155157f840 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/HttpServerVerticle.mustache @@ -0,0 +1,66 @@ +package {{invokerPackage}}; + +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.core.http.HttpServerOptions; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.api.contract.RouterFactoryOptions; +import io.vertx.reactivex.core.AbstractVerticle; +import io.vertx.reactivex.ext.web.api.contract.openapi3.OpenAPI3RouterFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.Map; +{{#apiInfo}}{{#apis}} +import {{apiPackage}}.{{classname}}Handler;{{/apis}}{{/apiInfo}} + +public class HttpServerVerticle extends AbstractVerticle { + + private static final Logger logger = LoggerFactory.getLogger(HttpServerVerticle.class); + + private static String specFile = "src/main/resources/openapi.yaml"; + + private Map> operationHandlers = new HashMap<>(); + + @Override + public void start(Future fut) { + {{#apiInfo}}{{#apis}} + new {{classname}}Handler(operationHandlers);{{/apis}}{{/apiInfo}} + + OpenAPI3RouterFactory.rxCreate(vertx, specFile) + .doOnSuccess(factory -> { + factory.setOptions(new RouterFactoryOptions() + .setRequireSecurityHandlers(false) + .setMountNotImplementedHandler(false)); + factory.setValidationFailureHandler(this::validationFailureHandler); + operationHandlers.forEach(factory.getDelegate()::addHandlerByOperationId); + }) + .map(OpenAPI3RouterFactory::getRouter) + .doOnSuccess(router -> router.route().last().handler(this::methodNotFoundHandler)) + .map(router -> + vertx.createHttpServer(new HttpServerOptions() + .setPort(8080) + .setHost("localhost")) + .requestHandler(router) + .listen() + ) + .subscribe( httpServer -> { + logger.info("Http verticle deployed successful"); + fut.complete(); + }, error -> { + logger.info("Http verticle failed to deployed", error); + fut.fail(error.getCause()); + }); + } + + private void validationFailureHandler(io.vertx.reactivex.ext.web.RoutingContext rc) { + rc.response().setStatusCode(400) + .end("Bad Request : " + rc.failure().getMessage()); + } + + private void methodNotFoundHandler(io.vertx.reactivex.ext.web.RoutingContext rc) { + rc.response().setStatusCode(404) + .end("Method '" + rc.request().path() + "' Not Found"); + } +} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/MainVerticle.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/MainVerticle.mustache new file mode 100644 index 00000000000..fd93c46ad92 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/MainVerticle.mustache @@ -0,0 +1,27 @@ +package {{invokerPackage}}; + +import io.vertx.core.DeploymentOptions; +import io.vertx.core.Future; +import io.vertx.reactivex.core.AbstractVerticle; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MainVerticle extends AbstractVerticle { + + private static final Logger logger = LoggerFactory.getLogger(MainVerticle.class); + + @Override + public void start(Future future) { + + DeploymentOptions options = new DeploymentOptions(); + options.setInstances(Runtime.getRuntime().availableProcessors()); + + vertx.deployVerticle(HttpServerVerticle.class.getName(), options, res -> { + if (!res.succeeded()) { + logger.error("Deployment fail reason: ", res.cause()); + } + }); + } +} + + diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ParameterCast.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ParameterCast.mustache new file mode 100644 index 00000000000..ba274ac31be --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ParameterCast.mustache @@ -0,0 +1,88 @@ +package {{invokerPackage}}; + +import com.fasterxml.jackson.core.type.TypeReference; +import io.vertx.core.json.Json; + +import java.util.UUID; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +public class ParameterCast { + + public static Boolean toBoolean(String str) { + if (str != null) { + return Boolean.parseBoolean(str); + } else { + return null; + } + } + + public static UUID toUUID(String str) { + if (str != null) { + return UUID.fromString(str); + } else { + return null; + } + } + + public static Integer toInteger(String str) { + if (str != null) { + return Integer.parseInt(str); + } else { + return null; + } + } + + public static Long toLong(String str) { + if (str != null) { + return Long.parseLong(str); + } else { + return null; + } + } + + public static Double toDouble(String str) { + if (str != null){ + return Double.parseDouble(str); + } else { + return null; + } + } + + public static Float toFloat(String str) { + if (str != null){ + return Float.parseFloat(str); + } else { + return null; + } + } + + public static OffsetDateTime toOffsetDateTime(String str) { + if (str != null) { + return OffsetDateTime.parse(str, + DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } else { + return null; + } + } + + public static String toString(String str) { + return str; + } + + public static T toObject(String str) { + if (str != null) { + return Json.decodeValue(str, new TypeReference(){}); + } else { + return null; + } + } + + public static T toObject(String str, Class classz) { + if (str != null) { + return Json.decodeValue(str, classz); + } else { + return null; + } + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/openapi.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/openapi.mustache new file mode 100644 index 00000000000..51ebafb0187 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache new file mode 100644 index 00000000000..dbe1de73426 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache @@ -0,0 +1,102 @@ + + 4.0.0 + + {{groupId}} + {{artifactId}} + {{artifactVersion}} + jar + + {{appName}} + + + 3.6.3 + 1.7.26 + 4.12 + + + + + org.slf4j + slf4j-simple + ${slf4j.version} + + + io.vertx + vertx-core + ${vertx.version} + + + io.vertx + vertx-web + ${vertx.version} + + + io.vertx + vertx-web-api-contract + ${vertx.version} + + + io.vertx + vertx-rx-java2 + ${vertx.version} + + + io.reactivex.rxjava2 + rxjava + 2.2.0 + + + + junit + junit + ${junit.version} + test + + + io.vertx + vertx-unit + ${vertx.version} + test + + + + + + + maven-compiler-plugin + 3.3 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.3 + + + package + + shade + + + + + + io.vertx.core.Starter + {{invokerPackage}}.MainVerticle + + + + + ${project.build.directory}/${project.artifactId}-${project.version}-fat.jar + + + + + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache index 15cc588f06b..fd4fb57e7d9 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache @@ -372,7 +372,7 @@ class ApiClient { * @param {Array.} accepts An array of acceptable response MIME types. * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one + * @param {String} apiBasePath base path defined in the operation/path level to override the default one {{^usePromises}} * @param {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function. {{/usePromises}} @@ -469,10 +469,12 @@ class ApiClient { request.end((error, response) => { if (error) { var err = {}; - err.status = response.status; - err.statusText = response.statusText; - err.body = response.body; - err.response = response; + if (response) { + err.status = response.status; + err.statusText = response.statusText; + err.body = response.body; + err.response = response; + } err.error = error; reject(err); diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache index bfe24d55709..bd87553eb22 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -7,7 +7,7 @@ "scripts": { "build": "babel src -d dist", "prepack": "npm run build", - "test": "mocha --compilers js:@babel/register --recursive" + "test": "mocha --require @babel/register --recursive" }, "browser": { "fs": false diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 3313be307ce..dcaf574f35f 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -51,6 +51,7 @@ org.openapitools.codegen.languages.JavaPKMSTServerCodegen org.openapitools.codegen.languages.JavaPlayFrameworkCodegen org.openapitools.codegen.languages.JavaUndertowServerCodegen org.openapitools.codegen.languages.JavaVertXServerCodegen +org.openapitools.codegen.languages.JavaVertXWebServerCodegen org.openapitools.codegen.languages.JavaCXFServerCodegen org.openapitools.codegen.languages.JavaCXFExtServerCodegen org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen @@ -76,6 +77,7 @@ org.openapitools.codegen.languages.PhpClientCodegen org.openapitools.codegen.languages.PhpLaravelServerCodegen org.openapitools.codegen.languages.PhpLumenServerCodegen org.openapitools.codegen.languages.PhpSlimServerCodegen +org.openapitools.codegen.languages.PhpSlim4ServerCodegen org.openapitools.codegen.languages.PhpSilexServerCodegen org.openapitools.codegen.languages.PhpSymfonyServerCodegen org.openapitools.codegen.languages.PhpZendExpressivePathHandlerServerCodegen diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache index 350ec5deb96..748e6fe2514 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache @@ -35,14 +35,14 @@ std::string {{classname}}::toJsonString() {{#vars}} {{^isContainer}} {{#isPrimitiveType}} - pt.put("{{name}}", m_{{name}}); + pt.put("{{baseName}}", m_{{name}}); {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isString}} - pt.put("{{name}}", m_{{name}}); + pt.put("{{baseName}}", m_{{name}}); {{/isString}} {{#isDateTime}} - pt.put("{{name}}", m_{{name}}); + pt.put("{{baseName}}", m_{{name}}); {{/isDateTime}} {{/isPrimitiveType}} {{/isContainer}} @@ -59,14 +59,14 @@ void {{classname}}::fromJsonString(std::string const& jsonString) {{#vars}} {{^isContainer}} {{#isPrimitiveType}} - m_{{name}} = pt.get("{{name}}", {{{defaultValue}}}); + m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isString}} - m_{{name}} = pt.get("{{name}}", {{{defaultValue}}}); + m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isString}} {{#isDateTime}} - m_{{name}} = pt.get("{{name}}", {{{defaultValue}}}); + m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isDateTime}} {{/isPrimitiveType}} {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache index 98561764711..7aa39cc22e6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -30,7 +30,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// {{#returnType}}{{returnType}}{{/returnType}} - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); /// /// {{summary}} @@ -41,7 +41,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}} - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -63,7 +63,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} - {{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); /// /// {{summary}} @@ -74,7 +74,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}} - System.Threading.Tasks.Task> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + System.Threading.Tasks.Task> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{/operation}} #endregion Asynchronous Operations } @@ -210,7 +210,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// {{#returnType}}{{returnType}}{{/returnType}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/returnType}} @@ -222,7 +222,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}} - public {{packageName}}.Client.ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} {{^isNullable}} @@ -234,60 +234,60 @@ namespace {{packageName}}.{{apiPackage}} {{/required}} {{/isNullable}} {{/allParams}} - {{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions(); + {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { {{#consumes}} "{{{mediaType}}}"{{#hasMore}}, {{/hasMore}} {{/consumes}} }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { {{#produces}} "{{{mediaType}}}"{{#hasMore}},{{/hasMore}} {{/produces}} }; - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); {{#pathParams}} if ({{paramName}} != null) - requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/pathParams}} {{#queryParams}} if ({{paramName}} != null) { - foreach (var kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } {{/queryParams}} {{#headerParams}} if ({{paramName}} != null) - requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/headerParams}} {{#formParams}} if ({{paramName}} != null) { {{#isFile}} - requestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); {{/isFile}} {{^isFile}} - requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter {{/isFile}} } {{/formParams}} {{#bodyParam}} - requestOptions.Data = {{paramName}}; + localVarRequestOptions.Data = {{paramName}}; {{/bodyParam}} {{#authMethods}} @@ -296,17 +296,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isKeyInHeader}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - requestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); + localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); } {{/isKeyInHeader}} {{#isKeyInQuery}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -316,29 +316,28 @@ namespace {{packageName}}.{{apiPackage}} // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasic}} {{#isOAuth}} // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } {{/isOAuth}} {{/authMethods}} // make the HTTP request - - var response = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", requestOptions, this.Configuration); + var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("{{operationId}}", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } {{#supportsAsync}} @@ -348,7 +347,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}AsyncWithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/returnType}} @@ -361,7 +360,7 @@ namespace {{packageName}}.{{apiPackage}} /// Thrown when fails to make API call {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} {{^isNullable}} @@ -374,60 +373,60 @@ namespace {{packageName}}.{{apiPackage}} {{/isNullable}} {{/allParams}} - {{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions(); + {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { {{#consumes}} "{{{mediaType}}}"{{#hasMore}}, {{/hasMore}} {{/consumes}} }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { {{#produces}} "{{{mediaType}}}"{{#hasMore}},{{/hasMore}} {{/produces}} }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); {{#pathParams}} if ({{paramName}} != null) - requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter {{/pathParams}} {{#queryParams}} if ({{paramName}} != null) { - foreach (var kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } {{/queryParams}} {{#headerParams}} if ({{paramName}} != null) - requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter {{/headerParams}} {{#formParams}} if ({{paramName}} != null) { {{#isFile}} - requestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); {{/isFile}} {{^isFile}} - requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter {{/isFile}} } {{/formParams}} {{#bodyParam}} - requestOptions.Data = {{paramName}}; + localVarRequestOptions.Data = {{paramName}}; {{/bodyParam}} {{#authMethods}} @@ -436,17 +435,17 @@ namespace {{packageName}}.{{apiPackage}} {{#isKeyInHeader}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - requestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); + localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); } {{/isKeyInHeader}} {{#isKeyInQuery}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -456,29 +455,29 @@ namespace {{packageName}}.{{apiPackage}} // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } {{/isBasic}} {{#isOAuth}} // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } {{/isOAuth}} {{/authMethods}} // make the HTTP request - var response = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("{{operationId}}", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } {{/supportsAsync}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache index 85f8252ce61..0770b36be17 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/model_doc.mustache @@ -1,6 +1,8 @@ {{#models}} {{#model}} # {{{packageName}}}.{{modelPackage}}.{{{classname}}} +{{#description}}{{&description}} +{{/description}} ## Properties Name | Type | Description | Notes diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index b190d663957..d09a7674082 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -51,14 +51,14 @@ class {{classname}} { {{^isListContainer}} var serializedBody = _serializers.serialize({{paramName}}); {{/isListContainer}} - var data = json.encode(serializedBody); + var json{{paramName}} = json.encode(serializedBody); {{/bodyParam}} return _dio.request( path, queryParameters: queryParams, {{#bodyParam}} - data: data, + data: json{{paramName}}, {{/bodyParam}} options: Options( method: '{{httpMethod}}'.toUpperCase(), diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache index 41743a4235c..cf95d3ce0eb 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -15,7 +15,7 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde @BuiltValueField(wireName: '{{baseName}}') {{{dataType}}} get {{name}}; {{#allowableValues}} - {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{ + {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}} {{/allowableValues}} {{/vars}} @@ -25,4 +25,4 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde factory {{classname}}([updates({{classname}}Builder b)]) = _${{classname}}; static Serializer<{{classname}}> get serializer => _${{classVarName}}Serializer; -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache index d4a4d2b8d11..ace44b16e0d 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache @@ -1,36 +1,34 @@ -@Entity() -class {{classname}} { - /// The underlying value of this enum member. - final {{dataType}} value; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; - const {{classname}}._internal(this.value); +part '{{classFilename}}.g.dart'; + +class {{classname}} extends EnumClass { {{#allowableValues}} {{#enumVars}} {{#description}} /// {{description}} {{/description}} - static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); + @BuiltValueEnumConst(wireName: '{{name}}') + static const {{classname}} {{name}} = _${{name}}; {{/enumVars}} {{/allowableValues}} + + + static Serializer<{{classname}}> get serializer => _${{classVarName}}Serializer; + + const {{classname}}._(String name): super(name); + + static BuiltSet<{{classname}}> get values => _$values; + static {{classname}} valueOf(String name) => _$valueOf(name); } -class {{classname}}TypeTransformer extends TypeTransformer<{{classname}}> { - - @override - dynamic encode({{classname}} data) { - return data.value; - } - - @override - {{classname}} decode(dynamic data) { - switch (data) { - {{#allowableValues}} - {{#enumVars}} - case {{{value}}}: return {{classname}}.{{{name}}}; - {{/enumVars}} - {{/allowableValues}} - default: throw('Unknown enum value to decode: $data'); - } - } -} +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class {{classname}}Mixin = Object with _${{classname}}Mixin; diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache index da50fb56612..ff2c84d195c 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache @@ -1,7 +1,7 @@ {{#models}} {{#model}} {{#imports}} - import 'package:{{.}}.dart'; + import '{{.}}'; {{/imports}} {{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} {{/model}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache index d69417f7cbd..0cfa432854b 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache @@ -4,10 +4,10 @@ description: {{pubDescription}} environment: sdk: ">=2.3.0 <3.0.0" dependencies: - dio: ^3.0.3 - built_value: 6.7.0 - built_collection: 4.2.2 + dio: ^3.0.4 + built_value: ^6.8.2 + built_collection: ^4.2.2 dev_dependencies: - built_value_generator: ^6.7.1 + built_value_generator: ^6.8.2 build_runner: ^1.7.1 test: 1.6.5 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache index c3af4534120..ec129d3d432 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache @@ -169,6 +169,12 @@ func (c *APIClient) ChangeBasePath(path string) { c.cfg.BasePath = path } +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, diff --git a/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache b/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache index e02a1be201b..d7aeada7577 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache @@ -1,6 +1,8 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/modules/openapi-generator/src/main/resources/go-experimental/go.sum b/modules/openapi-generator/src/main/resources/go-experimental/go.sum index e3c16fef3ac..ce55b3c6a08 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/go.sum +++ b/modules/openapi-generator/src/main/resources/go-experimental/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/modules/openapi-generator/src/main/resources/go-server/api.mustache b/modules/openapi-generator/src/main/resources/go-server/api.mustache new file mode 100644 index 00000000000..70020de3013 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/go-server/api.mustache @@ -0,0 +1,24 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "net/http"{{#apiInfo}}{{#apis}}{{#imports}} + "{{import}}"{{/imports}}{{/apis}}{{/apiInfo}} +) + +{{#apiInfo}}{{#apis}} +// {{classname}}Router defines the required methods for binding the api requests to a responses for the {{classname}} +// The {{classname}}Router implementation should parse necessary information from the http request, +// pass the data to a {{classname}}Servicer to perform the required actions, then write the service results to the http response. +type {{classname}}Router interface { {{#operations}}{{#operation}} + {{operationId}}(http.ResponseWriter, *http.Request){{/operation}}{{/operations}} +}{{/apis}}{{/apiInfo}}{{#apiInfo}}{{#apis}} + + +// {{classname}}Servicer defines the api actions for the {{classname}} service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type {{classname}}Servicer interface { {{#operations}}{{#operation}} + {{operationId}}({{#allParams}}{{dataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) (interface{}, error){{/operation}}{{/operations}} +}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache index bfde1e51a5b..61875a3de61 100644 --- a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache @@ -1,13 +1,85 @@ {{>partial_header}} package {{packageName}} -{{#operations}} import ( + "encoding/json" "net/http" -){{#operation}} + "strings" + + "github.com/gorilla/mux" +) + +// A {{classname}}Controller binds http requests to an api service and writes the service results to the http response +type {{classname}}Controller struct { + service {{classname}}Servicer +} + +// New{{classname}}Controller creates a default api controller +func New{{classname}}Controller(s {{classname}}Servicer) Router { + return &{{classname}}Controller{ service: s } +} + +// Routes returns all of the api route for the {{classname}}Controller +func (c *{{classname}}Controller) Routes() Routes { + return Routes{ {{#operations}}{{#operation}} + { + "{{operationId}}", + strings.ToUpper("{{httpMethod}}"), + "{{{basePathWithoutHost}}}{{{path}}}", + c.{{operationId}}, + },{{/operation}}{{/operations}} + } +}{{#operations}}{{#operation}} // {{nickname}} - {{{summary}}} -func {{nickname}}(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json; charset=UTF-8") - w.WriteHeader(http.StatusOK) +func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Request) { {{#hasFormParams}} + err := r.ParseForm() + if err != nil { + w.WriteHeader(500) + return + } + {{/hasFormParams}}{{#hasPathParams}} + params := mux.Vars(r){{/hasPathParams}}{{#hasQueryParams}} + query := r.URL.Query(){{/hasQueryParams}}{{#allParams}}{{#isPathParam}}{{#isLong}} + {{paramName}}, err := parseIntParameter(params["{{paramName}}"]) + if err != nil { + w.WriteHeader(500) + return + } + {{/isLong}}{{^isLong}} + {{paramName}} := params["{{paramName}}"]{{/isLong}}{{/isPathParam}}{{#isQueryParam}}{{#isLong}} + {{paramName}}, err := parseIntParameter(query.Get("{{paramName}}")) + if err != nil { + w.WriteHeader(500) + return + } + {{/isLong}}{{^isLong}} + {{paramName}} := {{#isListContainer}}strings.Split({{/isListContainer}}query.Get("{{paramName}}"){{#isListContainer}}, ","){{/isListContainer}}{{/isLong}}{{/isQueryParam}}{{#isFormParam}}{{#isFile}} + {{paramName}}, err := ReadFormFileToTempFile(r, "{{paramName}}") + if err != nil { + w.WriteHeader(500) + return + } + {{/isFile}}{{#isLong}} + {{paramName}}, err := parseIntParameter( r.FormValue("{{paramName}}")) + if err != nil { + w.WriteHeader(500) + return + } + {{/isLong}}{{^isFile}}{{^isLong}} + {{paramName}} := r.FormValue("{{paramName}}"){{/isLong}}{{/isFile}}{{/isFormParam}}{{#isHeaderParam}} + {{paramName}} := r.Header.Get("{{paramName}}"){{/isHeaderParam}}{{#isBodyParam}} + {{paramName}} := &{{dataType}}{} + if err := json.NewDecoder(r.Body).Decode(&{{paramName}}); err != nil { + w.WriteHeader(500) + return + } + {{/isBodyParam}}{{/allParams}} + result, err := c.service.{{nickname}}({{#allParams}}{{#isBodyParam}}*{{/isBodyParam}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) }{{/operation}}{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/go-server/main.mustache b/modules/openapi-generator/src/main/resources/go-server/main.mustache index a4c7a986163..377e7122e1b 100644 --- a/modules/openapi-generator/src/main/resources/go-server/main.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/main.mustache @@ -12,13 +12,16 @@ import ( // // sw "github.com/myname/myrepo/{{sourceFolder}}" // - sw "./{{sourceFolder}}" + {{packageName}} "./{{sourceFolder}}" ) func main() { log.Printf("Server started") - - router := sw.NewRouter() +{{#apiInfo}}{{#apis}} + {{classname}}Service := {{packageName}}.New{{classname}}Service() + {{classname}}Controller := {{packageName}}.New{{classname}}Controller({{classname}}Service) +{{/apis}}{{/apiInfo}} + router := {{packageName}}.NewRouter({{#apiInfo}}{{#apis}}{{classname}}Controller{{#hasMore}}, {{/hasMore}}{{/apis}}{{/apiInfo}}) log.Fatal(http.ListenAndServe(":{{serverPort}}", router)) } diff --git a/modules/openapi-generator/src/main/resources/go-server/routers.mustache b/modules/openapi-generator/src/main/resources/go-server/routers.mustache index 815fc5f75a5..941790cac37 100644 --- a/modules/openapi-generator/src/main/resources/go-server/routers.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/routers.mustache @@ -2,13 +2,16 @@ package {{packageName}} import ( - "fmt" + "encoding/json" + "io/ioutil" "net/http" - "strings" + "os" + "strconv" "github.com/gorilla/mux" ) +// A Route defines the parameters for an api endpoint type Route struct { Name string Method string @@ -16,41 +19,71 @@ type Route struct { HandlerFunc http.HandlerFunc } +// Routes are a collection of defined api endpoints type Routes []Route -func NewRouter() *mux.Router { - router := mux.NewRouter().StrictSlash(true) - for _, route := range routes { - var handler http.Handler - handler = route.HandlerFunc - handler = Logger(handler, route.Name) +// Router defines the required methods for retrieving api routes +type Router interface { + Routes() Routes +} - router. - Methods(route.Method). - Path(route.Pattern). - Name(route.Name). - Handler(handler) +// NewRouter creates a new router for any number of api routers +func NewRouter(routers ...Router) *mux.Router { + router := mux.NewRouter().StrictSlash(true) + for _, api := range routers { + for _, route := range api.Routes() { + var handler http.Handler + handler = route.HandlerFunc + handler = Logger(handler, route.Name) + + router. + Methods(route.Method). + Path(route.Pattern). + Name(route.Name). + Handler(handler) + } } return router } -func Index(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hello World!") +// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code +func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + if status != nil { + w.WriteHeader(*status) + } else { + w.WriteHeader(http.StatusOK) + } + + return json.NewEncoder(w).Encode(i) } -var routes = Routes{ - { - "Index", - "GET", - "{{{basePathWithoutHost}}}/", - Index, - },{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} +// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file +func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { + r.ParseForm() + formFile, _, err := r.FormFile(key) + if err != nil { + return nil, err + } - { - "{{operationId}}", - strings.ToUpper("{{httpMethod}}"), - "{{{basePathWithoutHost}}}{{{path}}}", - {{operationId}}, - },{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + defer formFile.Close() + file, err := ioutil.TempFile("tmp", key) + if err != nil { + return nil, err + } + + defer file.Close() + fileBytes, err := ioutil.ReadAll(formFile) + if err != nil { + return nil, err + } + + file.Write(fileBytes) + return file, nil +} + +// parseIntParameter parses a sting parameter to an int64 +func parseIntParameter(param string) (int64, error) { + return strconv.ParseInt(param, 10, 64) } diff --git a/modules/openapi-generator/src/main/resources/go-server/service.mustache b/modules/openapi-generator/src/main/resources/go-server/service.mustache new file mode 100644 index 00000000000..e9112f46958 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/go-server/service.mustache @@ -0,0 +1,25 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "errors"{{#imports}} + "{{import}}"{{/imports}} +) + +// {{classname}}Service is a service that implents the logic for the {{classname}}Servicer +// This service should implement the business logic for every endpoint for the {{classname}} API. +// Include any external packages or services that will be required by this service. +type {{classname}}Service struct { +} + +// New{{classname}}Service creates a default api service +func New{{classname}}Service() {{classname}}Servicer { + return &{{classname}}Service{} +}{{#operations}}{{#operation}} + +// {{nickname}} - {{summary}} +func (s *{{classname}}Service) {{nickname}}({{#allParams}}{{paramName}} {{dataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) (interface{}, error) { + // TODO - update {{nickname}} with the required logic for this service method. + // Add {{classFilename}}_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method '{{nickname}}' not implemented") +}{{/operation}}{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index c3af4534120..ec129d3d432 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -169,6 +169,12 @@ func (c *APIClient) ChangeBasePath(path string) { c.cfg.BasePath = path } +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, diff --git a/modules/openapi-generator/src/main/resources/go/go.mod.mustache b/modules/openapi-generator/src/main/resources/go/go.mod.mustache index cc360b34f49..83502890599 100644 --- a/modules/openapi-generator/src/main/resources/go/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go/go.mod.mustache @@ -1,8 +1,6 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/modules/openapi-generator/src/main/resources/go/go.sum b/modules/openapi-generator/src/main/resources/go/go.sum index 97b347238f4..ce55b3c6a08 100644 --- a/modules/openapi-generator/src/main/resources/go/go.sum +++ b/modules/openapi-generator/src/main/resources/go/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/modules/openapi-generator/src/main/resources/haskell-servant/API.mustache b/modules/openapi-generator/src/main/resources/haskell-servant/API.mustache index 4b02cb7f94c..400dee38f1d 100644 --- a/modules/openapi-generator/src/main/resources/haskell-servant/API.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-servant/API.mustache @@ -19,6 +19,7 @@ module {{title}}.API , {{title}}Backend(..) , create{{title}}Client , run{{title}}Server + , run{{title}}MiddlewareServer , run{{title}}Client , run{{title}}ClientWithManager , call{{title}} @@ -51,6 +52,7 @@ import GHC.Generics (Generic) import Network.HTTP.Client (Manager, newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Network.HTTP.Types.Method (methodOptions) +import Network.Wai (Middleware) import qualified Network.Wai.Handler.Warp as Warp import Servant (ServerError, serve) import Servant.API @@ -59,7 +61,8 @@ import Servant.Client (ClientEnv, Scheme (Http), C mkClientEnv, parseBaseUrl) import Servant.Client.Core (baseUrlPort, baseUrlHost) import Servant.Client.Internal.HttpClient (ClientM (..)) -import Servant.Server (Handler (..)) +import Servant.Server (Handler (..)){{#serveStatic}} +import Servant.Server.StaticFiles (serveDirectoryFileServer){{/serveStatic}} import Web.FormUrlEncoded import Web.HttpApiData @@ -129,7 +132,8 @@ formatSeparatedQueryList char = T.intercalate (T.singleton char) . map toQueryPa type {{title}}API = {{#apis}}{{#operations}}{{#operation}}{{& vendorExtensions.x-routeType}} -- '{{operationId}}' route{{#hasMore}} :<|> {{/hasMore}}{{/operation}}{{/operations}}{{#hasMore}} - :<|> {{/hasMore}}{{/apis}} + :<|> {{/hasMore}}{{/apis}}{{#serveStatic}} + :<|> Raw {{/serveStatic}} {{/apiInfo}} @@ -149,7 +153,7 @@ newtype {{title}}ClientError = {{title}}ClientError ClientError -- | Backend for {{title}}. -- The backend can be used both for the client and the server. The client generated from the {{title}} OpenAPI spec -- is a backend that executes actions by sending HTTP requests (see @create{{title}}Client@). Alternatively, provided --- a backend, the API can be served using @run{{title}}Server@. +-- a backend, the API can be served using @run{{title}}MiddlewareServer@. data {{title}}Backend m = {{title}}Backend { {{#apis}}{{#operations}}{{#operation}}{{operationId}} :: {{& vendorExtensions.x-clientType}}{- ^ {{& notes}} -}{{#hasMore}} , {{/hasMore}}{{/operation}}{{/operations}}{{#hasMore}} @@ -181,7 +185,8 @@ create{{title}}Client = {{title}}Backend{..} where ({{#apis}}{{#operations}}{{#operation}}(coerce -> {{operationId}}){{#hasMore}} :<|> {{/hasMore}}{{/operation}}{{/operations}}{{#hasMore}} :<|> - {{/hasMore}}{{/apis}}) = client (Proxy :: Proxy {{title}}API) + {{/hasMore}}{{/apis}}{{#serveStatic}} :<|> + _{{/serveStatic}}) = client (Proxy :: Proxy {{title}}API) -- | Run requests in the {{title}}Client monad. run{{title}}Client :: Config -> {{title}}Client a -> ExceptT ClientError IO a @@ -207,20 +212,31 @@ call{{title}} env f = do Right response -> pure response {{/apiInfo}} + {{#apiInfo}} +requestMiddlewareId :: Application -> Application +requestMiddlewareId a = a + -- | Run the {{title}} server at the provided host and port. run{{title}}Server +:: (MonadIO m, MonadThrow m) +=> Config -> {{title}}Backend (ExceptT ServerError IO) -> m () +run{{title}}Server config backend = run{{title}}MiddlewareServer config requestMiddlewareId backend + +-- | Run the {{title}} server at the provided host and port. +run{{title}}MiddlewareServer :: (MonadIO m, MonadThrow m) - => Config -> {{title}}Backend (ExceptT ServerError IO) -> m () -run{{title}}Server Config{..} backend = do + => Config -> Middleware -> {{title}}Backend (ExceptT ServerError IO) -> m () +run{{title}}MiddlewareServer Config{..} middleware backend = do url <- parseBaseUrl configUrl let warpSettings = Warp.defaultSettings & Warp.setPort (baseUrlPort url) & Warp.setHost (fromString $ baseUrlHost url) - liftIO $ Warp.runSettings warpSettings $ serve (Proxy :: Proxy {{title}}API) (serverFromBackend backend) + liftIO $ Warp.runSettings warpSettings $ middleware $ serve (Proxy :: Proxy {{title}}API) (serverFromBackend backend) where serverFromBackend {{title}}Backend{..} = ({{#apis}}{{#operations}}{{#operation}}coerce {{operationId}}{{#hasMore}} :<|> {{/hasMore}}{{/operation}}{{/operations}}{{#hasMore}} :<|> - {{/hasMore}}{{/apis}}) + {{/hasMore}}{{/apis}}{{#serveStatic}} :<|> + serveDirectoryFileServer "static"{{/serveStatic}}) {{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/haskell-servant/README.mustache b/modules/openapi-generator/src/main/resources/haskell-servant/README.mustache index 7a412893371..4dac568315c 100644 --- a/modules/openapi-generator/src/main/resources/haskell-servant/README.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-servant/README.mustache @@ -58,7 +58,7 @@ main = do ## Creating a Server -In order to create a server, you must use the `run{{title}}Server` function. However, you unlike the client, in which case you *got* a `{{title}}Backend` +In order to create a server, you must use the `run{{title}}MiddlewareServer` function. However, you unlike the client, in which case you *got* a `{{title}}Backend` from the library, you must instead *provide* a `{{title}}Backend`. For example, if you have defined handler functions for all the functions in `{{title}}.Handlers`, you can write: @@ -66,14 +66,24 @@ functions in `{{title}}.Handlers`, you can write: {-# LANGUAGE RecordWildCards #-} import {{title}}.API +-- required dependency: wai +import Network.Wai (Middleware) +-- required dependency: wai-extra +import Network.Wai.Middleware.RequestLogger (logStdout) -- A module you wrote yourself, containing all handlers needed for the {{title}}Backend type. import {{title}}.Handlers +-- If you would like to not use any middlewares you could use run{{title}}Server instead + +-- Combined middlewares +requestMiddlewares :: Middleware +requestMiddlewares = logStdout + -- Run a {{title}} server on localhost:8080 main :: IO () main = do let server = {{title}}Backend{..} config = Config "http://localhost:8080/" - run{{title}}Server config server + run{{title}}MiddlewareServer config requestMiddlewares server ``` diff --git a/modules/openapi-generator/src/main/resources/haskell-servant/haskell-servant-codegen.mustache b/modules/openapi-generator/src/main/resources/haskell-servant/haskell-servant-codegen.mustache index 777cf33d6a2..f41a28b41f2 100644 --- a/modules/openapi-generator/src/main/resources/haskell-servant/haskell-servant-codegen.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-servant/haskell-servant-codegen.mustache @@ -28,6 +28,7 @@ library , servant-client-core , servant-server , servant + , wai , warp , transformers , mtl diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache index bf0b1c374c1..236d2873bc5 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache @@ -14,7 +14,10 @@ public class {{{classname}}}Example { // Configure HTTP basic authorization: {{{name}}} HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{#isApiKey}} // Configure API key authorization: {{{name}}} ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); {{{name}}}.setApiKey("YOUR API KEY"); @@ -38,4 +41,4 @@ public class {{{classname}}}Example { e.printStackTrace(); } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache index 5f4dba929c1..d626c020d92 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache @@ -263,7 +263,7 @@ org.threeten threetenbp - 1.3.6 + 1.4.0 diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache index 14e11991fa3..46319b16e83 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache @@ -25,11 +25,36 @@ import {{packageName}}.infrastructure.toMultiValue * {{notes}} {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}}* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */{{#returnType}} @Suppress("UNCHECKED_CAST"){{/returnType}} + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}} { val localVariableBody: kotlin.Any? = {{#hasBodyParam}}{{#bodyParams}}{{paramName}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to "${{paramName}}"{{#hasMore}}, {{/hasMore}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} - val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mapOf(){{/hasQueryParams}}{{#hasQueryParams}}mapOf({{#queryParams}}"{{paramName}}" to {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{paramName}}"){{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/queryParams}}){{/hasQueryParams}} + val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mutableMapOf() +{{/hasQueryParams}}{{#hasQueryParams}}mutableMapOf>() + .apply { + {{#queryParams}} + {{^required}} + if ({{paramName}} != null) { + put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{paramName}}.toString()){{/isContainer}}) + } + {{/required}} + {{#required}} + {{#isNullable}} + if ({{paramName}} != null) { + put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{paramName}}.toString()){{/isContainer}}) + } + {{/isNullable}} + {{^isNullable}} + put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{paramName}}.toString()){{/isContainer}}) + {{/isNullable}} + {{/required}} + {{/queryParams}} + } + {{/hasQueryParams}} val localVariableHeaders: MutableMap = mutableMapOf({{#hasFormParams}}"Content-Type" to {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{MediaType}}"{{/consumes.0}}{{/hasFormParams}}{{^hasHeaderParams}}){{/hasHeaderParams}}{{#hasHeaderParams}}{{#hasFormParams}}, {{/hasFormParams}}{{#headerParams}}"{{baseName}}" to {{#isContainer}}{{paramName}}.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}{{paramName}}.toString(){{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/headerParams}}){{/hasHeaderParams}} val localVariableConfig = RequestConfig( RequestMethod.{{httpMethod}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 89e0197f8f7..b17954c6e14 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -42,7 +42,7 @@ dependencies { compile "com.squareup.okhttp3:okhttp:4.2.0" {{/jvm-okhttp4}} {{#threetenbp}} - compile "org.threeten:threetenbp:1.3.8" + compile "org.threeten:threetenbp:1.4.0" {{/threetenbp}} testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index a0630c4fa03..d3fc818aaa7 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -71,7 +71,7 @@ import java.io.Serializable {{/allowableValues}} {{#multiplatform}} - {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{nameInCamelCase}}>("{{nameInCamelCase}}", values(), values().map { it.value }.toTypedArray()) + {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{nameInCamelCase}}>("{{nameInCamelCase}}", values(), values().map { it.value.toString() }.toTypedArray()) {{/multiplatform}} } {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index 5ec0214d6c9..9a32aebeb5d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -3,10 +3,10 @@ {{/description}} {{#jvm}} {{#moshi}} - @Json(name = "{{{baseName}}}") + @Json(name = "{{{vendorExtensions.x-base-name-literal}}}") {{/moshi}} {{#gson}} - @SerializedName("{{name}}") + @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{/jvm}} - {{#multiplatform}}@SerialName(value = "{{baseName}}") {{/multiplatform}}val {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}val {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache index a60f1baf24a..c03711b6884 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache @@ -3,10 +3,10 @@ {{/description}} {{#jvm}} {{#moshi}} - @Json(name = "{{{baseName}}}") + @Json(name = "{{{vendorExtensions.x-base-name-literal}}}") {{/moshi}} {{#gson}} - @SerializedName("{{name}}") + @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{/jvm}} - {{#multiplatform}}@SerialName(value = "{{baseName}}") @Required {{/multiplatform}}val {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}val {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache index 102a2a2f939..9c848451846 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache @@ -42,6 +42,6 @@ import kotlinx.serialization.internal.CommonEnumSerializer {{/enumVars}}{{/allowableValues}} {{#multiplatform}} - {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{classname}}>("{{classname}}", values(), values().map { it.value }.toTypedArray()) + {{#nonPublicApi}}internal {{/nonPublicApi}}object Serializer : CommonEnumSerializer<{{classname}}>("{{classname}}", values(), values().map { it.value.toString() }.toTypedArray()) {{/multiplatform}} } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache index 7cdc8cc962e..4b7d0599cb2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/ApiAbstractions.kt.mustache @@ -1,12 +1,12 @@ package {{packageName}}.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> {{#nonPublicApi}}internal {{/nonPublicApi}}fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache index bac8d60f7a9..435583e9726 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache @@ -12,5 +12,5 @@ package {{packageName}}.infrastructure val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache index 1cd9edcf4b2..e7fcabf7ddf 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm/infrastructure/ApiClient.kt.mustache @@ -130,18 +130,26 @@ import java.io.File {{#isBasic}} {{^isBasicBearer}} if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = Credentials.basic(username, password) + username?.let { username -> + password?.let { password -> + requestConfig.headers[Authorization] = Credentials.basic(username, password) + } + } } {{/isBasicBearer}} {{#isBasicBearer}} if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } {{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } {{/isOAuth}} {{/authMethods}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache index 89777b14b8b..e49cc83507b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache @@ -41,6 +41,8 @@ import kotlinx.serialization.internal.StringDescriptor {{/returnType}} suspend fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : HttpResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> { + val localVariableAuthNames = listOf({{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}}) + val localVariableBody = {{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}{{operationIdCamelCase}}Request({{paramName}}.asList()){{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}{{operationIdCamelCase}}Request({{paramName}}){{/isMapContainer}}{{^isMapContainer}}{{paramName}}{{/isMapContainer}}{{/isListContainer}}{{/bodyParam}}{{/hasBodyParam}} {{^hasBodyParam}} {{#hasFormParams}} @@ -83,7 +85,8 @@ import kotlinx.serialization.internal.StringDescriptor return {{#hasBodyParam}}jsonRequest{{/hasBodyParam}}{{^hasBodyParam}}{{#hasFormParams}}{{#isMultipart}}multipartFormRequest{{/isMultipart}}{{^isMultipart}}urlEncodedFormRequest{{/isMultipart}}{{/hasFormParams}}{{^hasFormParams}}request{{/hasFormParams}}{{/hasBodyParam}}( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).{{#isListContainer}}wrap<{{operationIdCamelCase}}Response>().map { value.toTypedArray() }{{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}wrap<{{operationIdCamelCase}}Response>().map { value }{{/isMapContainer}}{{^isMapContainer}}wrap(){{/isMapContainer}}{{/isListContainer}} } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/ApiKeyAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/ApiKeyAuth.kt.mustache new file mode 100644 index 00000000000..618fd7a8890 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/ApiKeyAuth.kt.mustache @@ -0,0 +1,16 @@ +package {{packageName}}.auth + +class ApiKeyAuth(private val location: String, val paramName: String) : Authentication { + var apiKey: String? = null + var apiKeyPrefix: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val key: String = apiKey ?: return + val prefix: String? = apiKeyPrefix + val value: String = if (prefix != null) "$prefix $key" else key + when (location) { + "query" -> query[paramName] = listOf(value) + "header" -> headers[paramName] = value + } + } +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/Authentication.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/Authentication.kt.mustache new file mode 100644 index 00000000000..1aab9156d98 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/Authentication.kt.mustache @@ -0,0 +1,13 @@ +package {{packageName}}.auth + +interface Authentication { + + /** + * Apply authentication settings to header and query params. + * + * @param query Query parameters. + * @param headers Header parameters. + */ + fun apply(query: MutableMap>, headers: MutableMap) + +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache new file mode 100644 index 00000000000..ef6c5888ae1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache @@ -0,0 +1,17 @@ +package {{packageName}}.auth + +import io.ktor.util.InternalAPI +import io.ktor.util.encodeBase64 + +class HttpBasicAuth : Authentication { + var username: String? = null + var password: String? = null + + @InternalAPI + override fun apply(query: MutableMap>, headers: MutableMap) { + if (username == null && password == null) return + val str = (username ?: "") + ":" + (password ?: "") + val auth = str.encodeBase64() + headers["Authorization"] = "Basic $auth" + } +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBearerAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBearerAuth.kt.mustache new file mode 100644 index 00000000000..982389d0960 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBearerAuth.kt.mustache @@ -0,0 +1,14 @@ +package {{packageName}}.auth + +class HttpBearerAuth(private val scheme: String?) : Authentication { + var bearerToken: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val token: String = bearerToken ?: return + headers["Authorization"] = (if (scheme != null) upperCaseBearer(scheme)!! + " " else "") + token + } + + private fun upperCaseBearer(scheme: String): String? { + return if ("bearer".equals(scheme, ignoreCase = true)) "Bearer" else scheme + } +} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/OAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/OAuth.kt.mustache new file mode 100644 index 00000000000..98bb449a609 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/OAuth.kt.mustache @@ -0,0 +1,10 @@ +package {{packageName}}.auth + +class OAuth : Authentication { + var accessToken: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val token: String = accessToken ?: return + headers["Authorization"] = "Bearer $token" + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.mustache index 1e309cc464a..dfc6736dc6d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.mustache @@ -30,6 +30,7 @@ kotlin { jvm() iosArm64() { binaries { framework { freeCompilerArgs.add("-Xobjc-generics") } } } iosX64() { binaries { framework { freeCompilerArgs.add("-Xobjc-generics") } } } + js() sourceSets { commonMain { @@ -37,9 +38,9 @@ kotlin { implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serialization_version" - implementation "io.ktor:ktor-client-core:$ktor_version" - implementation "io.ktor:ktor-client-json:$ktor_version" - implementation "io.ktor:ktor-client-serialization:$ktor_version" + api "io.ktor:ktor-client-core:$ktor_version" + api "io.ktor:ktor-client-json:$ktor_version" + api "io.ktor:ktor-client-serialization:$ktor_version" } } @@ -57,9 +58,9 @@ kotlin { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version" - implementation "io.ktor:ktor-client-core-jvm:$ktor_version" - implementation "io.ktor:ktor-client-json-jvm:$ktor_version" - implementation "io.ktor:ktor-client-serialization-jvm:$ktor_version" + api "io.ktor:ktor-client-core-jvm:$ktor_version" + api "io.ktor:ktor-client-json-jvm:$ktor_version" + api "io.ktor:ktor-client-serialization-jvm:$ktor_version" } } @@ -77,7 +78,7 @@ kotlin { dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version" - implementation "io.ktor:ktor-client-ios:$ktor_version" + api "io.ktor:ktor-client-ios:$ktor_version" } } @@ -91,9 +92,9 @@ kotlin { iosArm64().compilations.main.defaultSourceSet { dependsOn iosMain dependencies { - implementation "io.ktor:ktor-client-ios-iosarm64:$ktor_version" - implementation "io.ktor:ktor-client-json-iosarm64:$ktor_version" - implementation "io.ktor:ktor-client-serialization-iosarm64:$ktor_version" + api "io.ktor:ktor-client-ios-iosarm64:$ktor_version" + api "io.ktor:ktor-client-json-iosarm64:$ktor_version" + api "io.ktor:ktor-client-serialization-iosarm64:$ktor_version" } } @@ -104,9 +105,31 @@ kotlin { iosX64().compilations.main.defaultSourceSet { dependsOn iosMain dependencies { - implementation "io.ktor:ktor-client-ios-iosx64:$ktor_version" - implementation "io.ktor:ktor-client-json-iosx64:$ktor_version" - implementation "io.ktor:ktor-client-serialization-iosx64:$ktor_version" + api "io.ktor:ktor-client-ios-iosx64:$ktor_version" + api "io.ktor:ktor-client-json-iosx64:$ktor_version" + api "io.ktor:ktor-client-serialization-iosx64:$ktor_version" + } + } + + jsMain { + dependsOn commonMain + dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutines_version" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serialization_version" + api "io.ktor:ktor-client-js:$ktor_version" + api "io.ktor:ktor-client-json-js:$ktor_version" + api "io.ktor:ktor-client-serialization-js:$ktor_version" + } + } + + jsTest { + dependsOn commonTest + dependencies { + implementation "io.ktor:ktor-client-mock-js:$ktor_version" + implementation "io.ktor:ktor-client-js:$ktor_version" + implementation "io.ktor:ktor-client-json:$ktor_version" + implementation "io.ktor:ktor-client-serialization-js:$ktor_version" } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/coroutine.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/Coroutine.kt.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/coroutine.mustache rename to modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/Coroutine.kt.mustache diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache index 26927bfd481..10aab1ba1b2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache @@ -23,6 +23,7 @@ import kotlinx.serialization.json.JsonConfiguration import {{apiPackage}}.* import {{modelPackage}}.* +import {{packageName}}.auth.* {{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient( private val baseUrl: String, @@ -46,6 +47,14 @@ import {{modelPackage}}.* httpClientEngine?.let { HttpClient(it, clientConfig) } ?: HttpClient(clientConfig) } + private val authentications: kotlin.collections.Map by lazy { + mapOf({{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + "{{name}}" to HttpBasicAuth(){{/isBasicBasic}}{{^isBasicBasic}} + "{{name}}" to HttpBearerAuth("{{scheme}}"){{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} + "{{name}}" to ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"){{/isApiKey}}{{#isOAuth}} + "{{name}}" to OAuth(){{/isOAuth}}{{#hasMore}}, {{/hasMore}}{{/authMethods}}) + } + {{#nonPublicApi}}internal {{/nonPublicApi}}companion object { protected val UNSAFE_HEADERS = listOf(HttpHeaders.ContentType) @@ -54,27 +63,96 @@ import {{modelPackage}}.* {{classname}}.setMappers(serializer) {{/apis}}{{/apiInfo}} {{#models}} - {{#model}}{{^isAlias}}serializer.setMapper({{classname}}::class, {{classname}}.serializer()){{/isAlias}}{{/model}} + {{#model}}{{^isAlias}}serializer.setMapper({{modelPackage}}.{{classname}}::class, {{modelPackage}}.{{classname}}.{{#isEnum}}Serializer{{/isEnum}}{{^isEnum}}serializer(){{/isEnum}}){{/isAlias}}{{/model}} {{/models}} } } - protected suspend fun multipartFormRequest(requestConfig: RequestConfig, body: List?): HttpResponse { - return request(requestConfig, MultiPartFormDataContent(body ?: listOf())) + /** + * Set the username for the first HTTP basic authentication. + * + * @param username Username + */ + fun setUsername(username: String) { + val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + ?: throw Exception("No HTTP basic authentication configured") + auth.username = username } - protected suspend fun urlEncodedFormRequest(requestConfig: RequestConfig, body: Parameters?): HttpResponse { - return request(requestConfig, FormDataContent(body ?: Parameters.Empty)) + /** + * Set the password for the first HTTP basic authentication. + * + * @param password Password + */ + fun setPassword(password: String) { + val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + ?: throw Exception("No HTTP basic authentication configured") + auth.password = password } - protected suspend fun jsonRequest(requestConfig: RequestConfig, body: Any? = null): HttpResponse { + /** + * Set the API key value for the first API key authentication. + * + * @param apiKey API key + * @param paramName The name of the API key parameter, or null or set the first key. + */ + fun setApiKey(apiKey: String, paramName: String? = null) { + val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + ?: throw Exception("No API key authentication configured") + auth.apiKey = apiKey + } + + /** + * Set the API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @param paramName The name of the API key parameter, or null or set the first key. + */ + fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { + val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + ?: throw Exception("No API key authentication configured") + auth.apiKeyPrefix = apiKeyPrefix + } + + /** + * Set the access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + fun setAccessToken(accessToken: String) { + val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + ?: throw Exception("No OAuth2 authentication configured") + auth.accessToken = accessToken + } + + /** + * Set the access token for the first Bearer authentication. + * + * @param bearerToken The bearer token. + */ + fun setBearerToken(bearerToken: String) { + val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + ?: throw Exception("No Bearer authentication configured") + auth.bearerToken = bearerToken + } + + protected suspend fun multipartFormRequest(requestConfig: RequestConfig, body: kotlin.collections.List?, authNames: kotlin.collections.List): HttpResponse { + return request(requestConfig, MultiPartFormDataContent(body ?: listOf()), authNames) + } + + protected suspend fun urlEncodedFormRequest(requestConfig: RequestConfig, body: Parameters?, authNames: kotlin.collections.List): HttpResponse { + return request(requestConfig, FormDataContent(body ?: Parameters.Empty), authNames) + } + + protected suspend fun jsonRequest(requestConfig: RequestConfig, body: Any? = null, authNames: kotlin.collections.List): HttpResponse { val contentType = (requestConfig.headers[HttpHeaders.ContentType]?.let { ContentType.parse(it) } ?: ContentType.Application.Json) - return if (body != null) request(requestConfig, serializer.write(body, contentType)) - else request(requestConfig) + return if (body != null) request(requestConfig, serializer.write(body, contentType), authNames) + else request(requestConfig, authNames = authNames) } - protected suspend fun request(requestConfig: RequestConfig, body: OutgoingContent = EmptyContent): HttpResponse { + protected suspend fun request(requestConfig: RequestConfig, body: OutgoingContent = EmptyContent, authNames: kotlin.collections.List): HttpResponse { + requestConfig.updateForAuth(authNames) val headers = requestConfig.headers return client.call { @@ -95,7 +173,14 @@ import {{modelPackage}}.* }.response } - private fun URLBuilder.appendPath(components: List): URLBuilder = apply { + private fun RequestConfig.updateForAuth(authNames: kotlin.collections.List) { + for (authName in authNames) { + val auth = authentications[authName] ?: throw Exception("Authentication undefined: $authName") + auth.apply(query, headers) + } + } + + private fun URLBuilder.appendPath(components: kotlin.collections.List): URLBuilder = apply { encodedPath = encodedPath.trimEnd('/') + components.joinToString("/", prefix = "/") { it.encodeURLQueryComponent() } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache new file mode 100644 index 00000000000..168cfc993c3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache @@ -0,0 +1,29 @@ +package {{packageName}}.infrastructure + +import kotlinx.serialization.* +import kotlinx.serialization.internal.StringDescriptor + +@Serializable +class Base64ByteArray(val value: ByteArray) { + @Serializer(Base64ByteArray::class) + companion object : KSerializer { + override val descriptor = StringDescriptor.withName("Base64ByteArray") + override fun serialize(encoder: Encoder, obj: Base64ByteArray) = encoder.encodeString(obj.value.encodeBase64()) + override fun deserialize(decoder: Decoder) = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this::class != other::class) return false + other as Base64ByteArray + return value.contentEquals(other.value) + } + + override fun hashCode(): Int { + return value.contentHashCode() + } + + override fun toString(): String { + return "Base64ByteArray(${hex(value)})" + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache new file mode 100644 index 00000000000..b85013e647b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache @@ -0,0 +1,102 @@ +package {{packageName}}.infrastructure + +import kotlinx.io.core.* +import kotlin.experimental.and + +private val digits = "0123456789abcdef".toCharArray() +private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" +private const val BASE64_MASK: Byte = 0x3f +private const val BASE64_PAD = '=' +private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } + +private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } +private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } +private fun Int.toBase64(): Char = BASE64_ALPHABET[this] +private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK +internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() +internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeStringUtf8(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes() + +/** + * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. + * + * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt + */ +internal fun hex(bytes: ByteArray): String { + val result = CharArray(bytes.size * 2) + var resultIndex = 0 + val digits = digits + + for (element in bytes) { + val b = element.toInt() and 0xff + result[resultIndex++] = digits[b shr 4] + result[resultIndex++] = digits[b and 0x0f] + } + + return String(result) +} + +/** + * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. + * + * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt + */ +internal fun hex(s: String): ByteArray { + val result = ByteArray(s.length / 2) + for (idx in result.indices) { + val srcIdx = idx * 2 + val high = s[srcIdx].toString().toInt(16) shl 4 + val low = s[srcIdx + 1].toString().toInt(16) + result[idx] = (high or low).toByte() + } + + return result +} + +/** + * Encode [ByteReadPacket] in base64 format. + * + * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt + */ +private fun ByteReadPacket.encodeBase64(): String = buildString { + val data = ByteArray(3) + while (remaining > 0) { + val read = readAvailable(data) + data.clearFrom(read) + + val padSize = (data.size - read) * 8 / 6 + val chunk = ((data[0].toInt() and 0xFF) shl 16) or + ((data[1].toInt() and 0xFF) shl 8) or + (data[2].toInt() and 0xFF) + + for (index in data.size downTo padSize) { + val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() + append(char.toBase64()) + } + + repeat(padSize) { append(BASE64_PAD) } + } +} + +/** + * Decode [ByteReadPacket] from base64 format + * + * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt + */ +private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { + val data = ByteArray(4) + + while (remaining > 0) { + val read = readAvailable(data) + + val chunk = data.foldIndexed(0) { index, result, current -> + result or (current.fromBase64().toInt() shl ((3 - index) * 6)) + } + + for (index in data.size - 2 downTo (data.size - read)) { + val origin = (chunk shr (8 * index)) and 0xff + writeByte(origin.toByte()) + } + } +} + + diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache new file mode 100644 index 00000000000..c23ac3ec000 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache @@ -0,0 +1,29 @@ +package {{packageName}}.infrastructure + +import kotlinx.serialization.* +import kotlinx.serialization.internal.StringDescriptor + +@Serializable +class OctetByteArray(val value: ByteArray) { + @Serializer(OctetByteArray::class) + companion object : KSerializer { + override val descriptor = StringDescriptor.withName("OctetByteArray") + override fun serialize(encoder: Encoder, obj: OctetByteArray) = encoder.encodeString(hex(obj.value)) + override fun deserialize(decoder: Decoder) = OctetByteArray(hex(decoder.decodeString())) + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this::class != other::class) return false + other as OctetByteArray + return value.contentEquals(other.value) + } + + override fun hashCode(): Int { + return value.contentHashCode() + } + + override fun toString(): String { + return "OctetByteArray(${hex(value)})" + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/coroutine.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/Coroutine.kt.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/coroutine.mustache rename to modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/Coroutine.kt.mustache diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache new file mode 100644 index 00000000000..2bea4861f67 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache @@ -0,0 +1,7 @@ +package util + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.promise + +actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/coroutine.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/Coroutine.kt.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/coroutine.mustache rename to modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/Coroutine.kt.mustache diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/.gitignore b/modules/openapi-generator/src/main/resources/php-slim4-server/.gitignore new file mode 100644 index 00000000000..db204792ea3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/.gitignore @@ -0,0 +1,17 @@ +# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore + +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +# phplint tool creates cache file which is not necessary in a codebase +/.phplint-cache + +# Do not commit local PHPUnit config +/phpunit.xml + +# Do not commit local PHP_CodeSniffer config +/phpcs.xml \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess new file mode 100644 index 00000000000..f6a2ceb3952 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/.htaccess @@ -0,0 +1,6 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^ index.php [QSA,L] + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache new file mode 100644 index 00000000000..8788d0d4676 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -0,0 +1,189 @@ +# {{packageName}} - PHP Slim 4 Server library for {{appName}} + +* [OpenAPI Generator](https://openapi-generator.tech) +* [Slim 4 Documentation](https://www.slimframework.com/docs/v4/) + +{{#isSlimPsr7}} +This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim-Psr7) implementation. +{{/isSlimPsr7}} +{{#isNyholmPsr7}} +This server has been generated with [Nyholm PSR-7](https://github.com/Nyholm/psr7) implementation and [Nyholm PSR-7 Server](https://github.com/Nyholm/psr7-server). +{{/isNyholmPsr7}} +{{#isGuzzlePsr7}} +This server has been generated with [Guzzle PSR-7](https://github.com/guzzle/psr7) implementation and [Guzzle HTTP Factory](https://github.com/http-interop/http-factory-guzzle). +{{/isGuzzlePsr7}} +{{#isZendDiactoros}} +This server has been generated with [Zend Diactoros](https://github.com/zendframework/zend-diactoros). +{{/isZendDiactoros}} + +## Requirements + +* Web server with URL rewriting +* PHP 7.1 or newer + +This package contains `.htaccess` for Apache configuration. +If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc. + +## Installation via [Composer](https://getcomposer.org/) + +Navigate into your project's root directory and execute the bash command shown below. +This command downloads the Slim Framework and its third-party dependencies into your project's `vendor/` directory. +```bash +$ composer install +``` + +## Start devserver + +Run the following command in terminal to start localhost web server, assuming `./php-slim-server/` is public-accessible directory with `index.php` file: +```bash +$ php -S localhost:8888 -t php-slim-server +``` +> **Warning** This web server was designed to aid application development. +> It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. +> It is not intended to be a full-featured web server. It should not be used on a public network. + +## Tests + +### PHPUnit + +This package uses PHPUnit 6 or 7(depends from your PHP version) for unit testing. +[Test folder]({{testBasePath}}) contains templates which you can fill with real test assertions. +How to write tests read at [PHPUnit Manual - Chapter 2. Writing Tests for PHPUnit](https://phpunit.de/manual/6.5/en/writing-tests-for-phpunit.html). + +#### Run + +Command | Target +---- | ---- +`$ composer test` | All tests +`$ composer test-apis` | Apis tests +`$ composer test-models` | Models tests + +#### Config + +Package contains fully functional config `./phpunit.xml.dist` file. Create `./phpunit.xml` in root folder to override it. + +Quote from [3. The Command-Line Test Runner — PHPUnit 7.4 Manual](https://phpunit.readthedocs.io/en/7.4/textui.html#command-line-options): + +> If phpunit.xml or phpunit.xml.dist (in that order) exist in the current working directory and --configuration is not used, the configuration will be automatically read from that file. + +### PHP CodeSniffer + +[PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki). This tool helps to follow coding style and avoid common PHP coding mistakes. + +#### Run + +```bash +$ composer phpcs +``` + +#### Config + +Package contains fully functional config `./phpcs.xml.dist` file. It checks source code against PSR-1 and PSR-2 coding standards. +Create `./phpcs.xml` in root folder to override it. More info at [Using a Default Configuration File](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) + +### PHPLint + +[PHPLint Documentation](https://github.com/overtrue/phplint). Checks PHP syntax only. + +#### Run + +```bash +$ composer phplint +``` + +## Show errors + +Switch on option in `./index.php`: +```diff +/** + * Add Error Handling Middleware + * + * @param bool $displayErrorDetails -> Should be set to false in production + * @param bool $logErrors -> Parameter is passed to the default ErrorHandler + * @param bool $logErrorDetails -> Display error details in error log + * which can be replaced by a callable of your choice. + + * Note: This middleware should be added last. It will not handle any exceptions/errors + * for middleware added after it. + */ +--- $app->addErrorMiddleware(false, true, true); ++++ $app->addErrorMiddleware(true, true, true); +``` + +{{#generateApiDocs}} +## API Endpoints + +All URIs are relative to *{{{basePath}}}* + +> Important! Do not modify abstract API controllers directly! Instead extend them by implementation classes like: + +```php +// src/Api/PetApi.php + +namespace {{apiPackage}}; + +use {{apiPackage}}\AbstractPetApi; + +class PetApi extends AbstractPetApi +{ + + public function addPet($request, $response, $args) + { + // your implementation of addPet method here + } +} +``` + +Place all your implementation classes in `./src` folder accordingly. +For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you need to create implementation class at `./src/Api/PetApi.php`. + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +{{/generateApiDocs}} + +{{#generateModelDocs}} +## Models + +{{#modelPackage}} +{{#models}}{{#model}}* {{{modelPackage}}}\{{{classname}}} +{{/model}}{{/models}} +{{/modelPackage}} +{{^modelPackage}} +No model defined in this package +{{/modelPackage}} +{{/generateModelDocs}} + +{{#hasAuthMethods}} +{{#authMethods}} +{{^hasMore}} +## Authentication + +{{/hasMore}} +{{/authMethods}} +{{#authMethods}} +{{#isBasic}} +### Security schema `{{name}}` +> Important! To make Basic authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\BasicAuthenticator](./src/Auth/BasicAuthenticator.php) class. + +{{/isBasic}} +{{#isApiKey}} +### Security schema `{{name}}` +> Important! To make ApiKey authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\ApiKeyAuthenticator](./src/Auth/ApiKeyAuthenticator.php) class. + +{{/isApiKey}} +{{#isOAuth}} +### Security schema `{{name}}` +> Important! To make OAuth authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\OAuthAuthenticator](./src/Auth/OAuthAuthenticator.php) class. + +Scope list: +{{#scopes}} +* `{{scope}}`{{#description}} - {{description}}{{/description}} +{{/scopes}} + +{{/isOAuth}} +{{/authMethods}} +### Advanced middleware configuration +Ref to used Slim Token Middleware [dyorg/slim-token-authentication](https://github.com/dyorg/slim-token-authentication/tree/1.x#readme) +{{/hasAuthMethods}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache new file mode 100644 index 00000000000..d7ddf7b2384 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache @@ -0,0 +1,294 @@ + '{{httpMethod}}', + 'basePathWithoutHost' => '{{{basePathWithoutHost}}}', + 'path' => '{{{path}}}', + 'apiPackage' => '{{apiPackage}}', + 'classname' => '{{classname}}', + 'userClassname' => '{{userClassname}}', + 'operationId' => '{{operationId}}', + 'authMethods' => [ + {{#hasAuthMethods}} + {{#authMethods}} + // {{type}} security schema named '{{name}}' + {{#isBasicBasic}} + [ + 'type' => '{{type}}', + 'isBasic' => true, + 'isBearer' => false, + 'isApiKey' => false, + 'isOAuth' => false, + ], + {{/isBasicBasic}} + {{#isBasicBearer}} + [ + 'type' => '{{type}}', + 'isBasic' => true, + 'isBearer' => true, + 'isApiKey' => false, + 'isOAuth' => false, + ], + {{/isBasicBearer}} + {{#isApiKey}} + [ + 'type' => '{{type}}', + 'isBasic' => false, + 'isBearer' => false, + 'isApiKey' => true, + 'isOAuth' => false, + 'keyParamName' => '{{keyParamName}}', + 'isKeyInHeader' => {{#isKeyInHeader}}true{{/isKeyInHeader}}{{^isKeyInHeader}}false{{/isKeyInHeader}}, + 'isKeyInQuery' => {{#isKeyInQuery}}true{{/isKeyInQuery}}{{^isKeyInQuery}}false{{/isKeyInQuery}}, + 'isKeyInCookie' => {{#isKeyInCookie}}true{{/isKeyInCookie}}{{^isKeyInCookie}}false{{/isKeyInCookie}}, + ], + {{/isApiKey}} + {{#isOAuth}} + [ + 'type' => '{{type}}', + 'isBasic' => false, + 'isBearer' => false, + 'isApiKey' => false, + 'isOAuth' => true, + 'scopes' => [ + {{#scopes}} + '{{scope}}',{{#description}} // {{description}}{{/description}} + {{/scopes}} + ], + ], + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + ], + ], + {{/operation}} + {{/operations}} + {{/apis}} + ]; + + /** + * Class constructor + * + * @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings + * + * @throws Exception When implementation class doesn't exists + */ + public function __construct($settings = []) + { + if ($settings instanceof ContainerInterface) { + // Set container to create App with on AppFactory + AppFactory::setContainer($settings); + } + $this->slimApp = AppFactory::create(); + + // middlewares requires Psr\Container\ContainerInterface + $container = $this->slimApp->getContainer(); + + {{#hasAuthMethods}} + $authPackage = '{{authPackage}}'; + $basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { + $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\BasicAuthenticator?"; + throw new Exception($message); + }; + $apiKeyAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { + $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\ApiKeyAuthenticator?"; + throw new Exception($message); + }; + $oAuthAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) { + $message = "How about extending {{abstractNamePrefix}}Authenticator{{abstractNameSuffix}} class by {$authPackage}\OAuthAuthenticator?"; + throw new Exception($message); + }; + {{/hasAuthMethods}} + + $userOptions = null; + if ($settings instanceof ContainerInterface && $settings->has('tokenAuthenticationOptions')) { + $userOptions = $settings->get('tokenAuthenticationOptions'); + } elseif (is_array($settings) && isset($settings['tokenAuthenticationOptions'])) { + $userOptions = $settings['tokenAuthenticationOptions']; + } + + foreach ($this->operations as $operation) { + $callback = function ($request, $response, $arguments) use ($operation) { + $message = "How about extending {$operation['classname']} by {$operation['apiPackage']}\\{$operation['userClassname']} class implementing {$operation['operationId']} as a {$operation['httpMethod']} method?"; + throw new Exception($message); + $response->getBody()->write($message); + return $response->withStatus(501); + }; + $middlewares = [new JsonBodyParserMiddleware()]; + + if (class_exists("\\{$operation['apiPackage']}\\{$operation['userClassname']}")) { + $callback = "\\{$operation['apiPackage']}\\{$operation['userClassname']}:{$operation['operationId']}"; + } + + {{#hasAuthMethods}} + foreach ($operation['authMethods'] as $authMethod) { + switch ($authMethod['type']) { + case 'http': + $authenticatorClassname = "\\{$authPackage}\\BasicAuthenticator"; + if (class_exists($authenticatorClassname)) { + $basicAuthenticator = new $authenticatorClassname($container); + } + + $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ + 'authenticator' => $basicAuthenticator, + 'regex' => $authMethod['isBearer'] ? '/Bearer\s+(.*)$/i' : '/Basic\s+(.*)$/i', + 'header' => 'Authorization', + 'parameter' => null, + 'cookie' => null, + 'argument' => null, + ], $userOptions)); + break; + case 'apiKey': + $authenticatorClassname = "\\{$authPackage}\\ApiKeyAuthenticator"; + if (class_exists($authenticatorClassname)) { + $apiKeyAuthenticator = new $authenticatorClassname($container); + } + + $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ + 'authenticator' => $apiKeyAuthenticator, + 'regex' => '/^(.*)$/i', + 'header' => $authMethod['isKeyInHeader'] ? $authMethod['keyParamName'] : null, + 'parameter' => $authMethod['isKeyInQuery'] ? $authMethod['keyParamName'] : null, + 'cookie' => $authMethod['isKeyInCookie'] ? $authMethod['keyParamName'] : null, + 'argument' => null, + ], $userOptions)); + break; + case 'oauth2': + $authenticatorClassname = "\\{$authPackage}\\OAuthAuthenticator"; + if (class_exists($authenticatorClassname)) { + $oAuthAuthenticator = new $authenticatorClassname($container, $authMethod['scopes']); + } + + $middlewares[] = new TokenAuthentication($this->getTokenAuthenticationOptions([ + 'authenticator' => $oAuthAuthenticator, + 'regex' => '/Bearer\s+(.*)$/i', + 'header' => 'Authorization', + 'parameter' => null, + 'cookie' => null, + 'argument' => null, + ], $userOptions)); + break; + default: + throw new Exception('Unknown authorization schema type'); + } + } + {{/hasAuthMethods}} + + $this->addRoute( + [$operation['httpMethod']], + "{$operation['basePathWithoutHost']}{$operation['path']}", + $callback, + $middlewares + )->setName($operation['operationId']); + } + } + + /** + * Merges user defined options with dynamic params + * + * @param array $staticOptions Required static options + * @param array $userOptions User options + * + * @return array Merged array + */ + private function getTokenAuthenticationOptions(array $staticOptions, array $userOptions = null) + { + if (is_array($userOptions) === false) { + return $staticOptions; + } + + return array_merge($userOptions, $staticOptions); + } + + /** + * Add route with multiple methods + * + * @param string[] $methods Numeric array of HTTP method names + * @param string $pattern The route URI pattern + * @param callable|string $callable The route callback routine + * @param array|null $middlewares List of middlewares + * + * @return RouteInterface + * + * @throws InvalidArgumentException If the route pattern isn't a string + */ + public function addRoute(array $methods, string $pattern, $callable, $middlewares = []) + { + $route = $this->slimApp->map($methods, $pattern, $callable); + foreach ($middlewares as $middleware) { + $route->add($middleware); + } + return $route; + } + + /** + * Returns Slim Framework instance + * + * @return App + */ + public function getSlimApp() + { + return $this->slimApp; + } +} +{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache new file mode 100644 index 00000000000..fc6f69f2ebc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache @@ -0,0 +1,117 @@ +container = $container; + $this->requiredScope = $requiredScope; + } + + /** + * Makes the api key validation of your application + * + * Just an example of implementation. Override this method to fit your needs + * + * @param ServerRequestInterface $request HTTP request + * @param TokenSearch $tokenSearch Middleware instance which contains api key in token + * + * @return bool Must return either true or false + * @throws UnauthorizedExceptionInterface when cannot parse token + */ + public function __invoke(ServerRequestInterface &$request, TokenSearch $tokenSearch) + { + /** + * Try find authorization token via header, parameters, cookie or attribute + * If token not found, return response with status 401 (unauthorized) + */ + $token = $tokenSearch->getToken($request); + + /** + * Verify if token is valid on database + * If token isn't valid, expired or has insufficient scope must throw an UnauthorizedExceptionInterface + */ + $user = $this->getUserByToken($token); + + /** + * Set authenticated user at attributes + */ + $request = $request->withAttribute('authenticated_user', $user); + + return true; + } +} +{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache new file mode 100644 index 00000000000..3ed8ca75ed0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache @@ -0,0 +1,134 @@ +container = $container; + } + + {{#operations}} + {{#operation}} + + /** + * {{httpMethod}} {{operationId}} + {{#summary}} + * Summary: {{summary}} + {{/summary}} + {{#notes}} + * Notes: {{notes}} + {{/notes}} + {{#hasProduces}} + * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}] + {{/hasProduces}} + * + * @param ServerRequestInterface $request Request + * @param ResponseInterface $response Response + * @param array|null $args Path arguments + * + * @return ResponseInterface + * @throws Exception to force implementation class to override this method + */ + public function {{operationId}}(ServerRequestInterface $request, ResponseInterface $response, array $args) + { + {{#hasHeaderParams}} + $headers = $request->getHeaders(); + {{#headerParams}} + ${{paramName}} = $request->hasHeader('{{baseName}}') ? $headers['{{baseName}}'] : null; + {{/headerParams}} + {{/hasHeaderParams}} + {{#hasPathParams}} + {{#pathParams}} + ${{paramName}} = $args['{{baseName}}']; + {{/pathParams}} + {{/hasPathParams}} + {{#hasQueryParams}} + $queryParams = $request->getQueryParams(); + {{#queryParams}} + ${{paramName}} = (key_exists('{{baseName}}', $queryParams)) ? $queryParams['{{baseName}}'] : null; + {{/queryParams}} + {{/hasQueryParams}} + {{#hasFormParams}} + $body = $request->getParsedBody(); + {{#formParams}} + {{^isFile}} + ${{paramName}} = (isset($body['{{baseName}}'])) ? $body['{{baseName}}'] : null; + {{/isFile}} + {{#isFile}} + {{#isMultipart}} + ${{paramName}} = (key_exists('{{baseName}}', $request->getUploadedFiles())) ? $request->getUploadedFiles()['{{baseName}}'] : null; + {{/isMultipart}} + {{^isMultipart}} + ${{paramName}} = (isset($body['{{baseName}}'])) ? $body['{{baseName}}'] : null; + {{/isMultipart}} + {{/isFile}} + {{/formParams}} + {{/hasFormParams}} + {{#hasBodyParam}} + $body = $request->getParsedBody(); + {{/hasBodyParam}} + $message = "How about implementing {{nickname}} as a {{httpMethod}} method in {{apiPackage}}\{{userClassname}} class?"; + throw new Exception($message); + + $response->getBody()->write($message); + return $response->withStatus(501); + } + {{/operation}} + {{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache new file mode 100644 index 00000000000..8fdc30affbf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache @@ -0,0 +1,92 @@ + true, + + /** + * Alternatively you can list your development host to have relaxed security. + * Default: ['localhost', '127.0.0.1'] + */ + // 'relaxed' => ['localhost', '127.0.0.1'], + + /** + * By default on ocurred a fail on authentication, is sent a response on json format with a + * message (`Invalid Token` or `Not found Token`) and with the token (if found), with status + * `401 Unauthorized`. You can customize it by setting a callable function on error option. + * Default: null + */ + // 'error' => null, +]; + +$router = new SlimRouter($config); +$app = $router->getSlimApp(); + +/** + * The routing middleware should be added before the ErrorMiddleware + * Otherwise exceptions thrown from it will not be handled + */ +$app->addRoutingMiddleware(); + +/** + * Add Error Handling Middleware + * + * @param bool $displayErrorDetails -> Should be set to false in production + * @param bool $logErrors -> Parameter is passed to the default ErrorHandler + * @param bool $logErrorDetails -> Display error details in error log + * which can be replaced by a callable of your choice. + + * Note: This middleware should be added last. It will not handle any exceptions/errors + * for middleware added after it. + */ +$app->addErrorMiddleware(false, true, true); + +$app->run(); diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache new file mode 100644 index 00000000000..276dd864d8d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache @@ -0,0 +1,74 @@ +getHeaderLine('Content-Type'); + + if (strstr($contentType, 'application/json')) { + $contents = json_decode(file_get_contents('php://input'), true); + if (json_last_error() === JSON_ERROR_NONE) { + $request = $request->withParsedBody($contents); + } + } + + return $handler->handle($request); + } +} +{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache new file mode 100644 index 00000000000..e1b4f5119ea --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache @@ -0,0 +1,33 @@ + + + PHP_CodeSniffer config for {{appName}} + + + ./ + + + ./vendor + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache new file mode 100644 index 00000000000..b8852944a12 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache @@ -0,0 +1,30 @@ + + + + + {{apiTestPath}} + + + {{modelTestPath}} + + + + + {{apiSrcPath}} + {{modelSrcPath}} + + + + + + diff --git a/modules/openapi-generator/src/main/resources/python-flask/setup.mustache b/modules/openapi-generator/src/main/resources/python-flask/setup.mustache index ef4c3bd3c0a..bda71175d0d 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/setup.mustache @@ -14,10 +14,10 @@ VERSION = "{{packageVersion}}" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0"{{#supportPython2}}, - "typing==3.5.2.2"{{/supportPython2}} + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0"{{#supportPython2}}, + "typing>=3.5.2.2"{{/supportPython2}} ] setup( diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 63dd91ebb5d..790ec220461 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -3,6 +3,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -294,7 +295,7 @@ class ApiClient(object): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -347,18 +348,19 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - return thread + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -584,7 +586,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -594,7 +595,7 @@ class ApiClient(object): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -603,7 +604,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index 17264bb46b0..70f6e7489a7 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -27,6 +27,10 @@ class {{classname}}(object): {{/-last}} {{/enumVars}}{{/allowableValues}} +{{#allowableValues}} + allowable_values = [{{#enumVars}}{{name}}{{^-last}}, {{/-last}}{{/enumVars}}] # noqa: E501 + +{{/allowableValues}} """ Attributes: openapi_types (dict): The key is attribute name diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache index 71c106fdc55..fc90a2e0fc5 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache @@ -1,5 +1,7 @@ {{#models}}{{#model}}# {{classname}} +{{#description}}{{&description}} +{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache index dd650b37d7f..651559cf4ff 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache @@ -14,10 +14,20 @@ from {{packageName}}.exceptions import ( ApiTypeError, ApiValueError ) -from {{packageName}}.model_utils import ( +from {{packageName}}.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +{{#imports}} +{{{import}}} +{{/imports}} {{#operations}} @@ -51,24 +61,51 @@ class {{classname}}(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. {{#allParams}} :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} {{/allParams}} :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) {{#requiredParams}} kwargs['{{paramName}}'] = {{paramName}} {{/requiredParams}} @@ -76,7 +113,7 @@ class {{classname}}(object): self.{{operationId}} = Endpoint( settings={ - 'response_type': {{#returnType}}'{{returnType}}'{{/returnType}}{{^returnType}}None{{/returnType}}, + 'response_type': {{#returnType}}({{{returnType}}},){{/returnType}}{{^returnType}}None{{/returnType}}, {{#authMethods}} {{#-first}} 'auth': [ @@ -178,7 +215,7 @@ class {{classname}}(object): }, 'openapi_types': { {{#allParams}} - '{{paramName}}': '{{dataType}}', + '{{paramName}}': ({{{dataType}}},), {{/allParams}} }, 'attribute_map': { @@ -237,7 +274,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -273,11 +310,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -291,8 +341,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -303,6 +352,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -316,14 +379,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -348,20 +417,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -370,7 +434,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -409,9 +477,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache index 0f02b445dfb..aec1ef37536 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache @@ -2,14 +2,10 @@ {{>partial_header}} from __future__ import absolute_import -import datetime -import inspect import json import mimetypes from multiprocessing.pool import ThreadPool import os -import re -import tempfile # python 2 and python 3 compatibility library import six @@ -18,14 +14,20 @@ from six.moves.urllib.parse import quote import tornado.gen {{/tornado}} -import {{modelPackage}} from {{packageName}} import rest from {{packageName}}.configuration import Configuration +from {{packageName}}.exceptions import ApiValueError from {{packageName}}.model_utils import ( ModelNormal, - ModelSimple + ModelSimple, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + str, + validate_and_convert_types ) -from {{packageName}}.exceptions import ApiValueError class ApiClient(object): @@ -50,17 +52,11 @@ class ApiClient(object): to the API. More threads means more concurrent API requests. """ - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } + # six.binary_type python2=str, python3=bytes + # six.text_type python2=unicode, python3=str + PRIMITIVE_TYPES = ( + (float, bool, six.binary_type, six.text_type) + six.integer_types + ) _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, @@ -113,7 +109,8 @@ class ApiClient(object): query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + _preload_content=True, _request_timeout=None, _host=None, + _check_type=None): config = self.configuration @@ -180,7 +177,11 @@ class ApiClient(object): if _preload_content: # deserialize response data if response_type: - return_data = self.deserialize(response_data, response_type) + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) else: return_data = None @@ -223,93 +224,73 @@ class ApiClient(object): elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): + elif isinstance(obj, (datetime, date)): return obj.isoformat() if isinstance(obj, dict): obj_dict = obj elif isinstance(obj, ModelNormal): - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. + # Convert model obj to dict # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} + # model definition for request + obj_dict = model_to_dict(obj, serialize=True) elif isinstance(obj, ModelSimple): return self.sanitize_for_serialization(obj.value) return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)} - def deserialize(self, response, response_type): + def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server :return: deserialized object. """ # handle file downloading # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) # fetch data from response object try: - data = json.loads(response.data) + received_data = json.loads(response.data) except ValueError: - data = response.data + received_data = response.data - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr({{modelPackage}}, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + _preload_content=True, _request_timeout=None, _host=None, + _check_type=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. @@ -324,9 +305,18 @@ class ApiClient(object): :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files dict: key -> field name, value -> a list of open file + objects for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers @@ -339,6 +329,8 @@ class ApiClient(object): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. :return: If async_req parameter is True, the request will be called asynchronously. @@ -352,7 +344,8 @@ class ApiClient(object): body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) + _preload_content, _request_timeout, _host, + _check_type) else: thread = self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, @@ -363,7 +356,7 @@ class ApiClient(object): collection_formats, _preload_content, _request_timeout, - _host)) + _host, _check_type)) return thread def request(self, method, url, query_params=None, headers=None, @@ -460,24 +453,34 @@ class ApiClient(object): def files_parameters(self, files=None): """Builds form parameters. - :param files: File parameters. - :return: Form parameters with files. + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data """ - params = [] + if files is None: + return [] - if files: - for k, v in six.iteritems(files): - if not v: + params = [] + for param_name, file_instances in six.iteritems(files): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = file_instance.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + file_instance.close() return params @@ -538,133 +541,3 @@ class ApiClient(object): raise ApiValueError( 'Authentication token must be in `query` or `header`' ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - except ValueError as exc: - raise ApiValueError(str(exc)) - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal, ModelSimple or ModelNormal - :return: model object. - """ - - if issubclass(klass, ModelSimple): - value = self.__deserialize(data, klass.openapi_types['value']) - return klass(value) - - # code to handle ModelNormal - used_data = data - if not isinstance(data, (list, dict)): - used_data = [data] - keyword_args = {} - positional_args = [] - if klass.openapi_types is not None: - for attr, attr_type in six.iteritems(klass.openapi_types): - if (data is not None and - klass.attribute_map[attr] in used_data): - value = used_data[klass.attribute_map[attr]] - keyword_args[attr] = self.__deserialize(value, attr_type) - end_index = None - argspec = inspect.getargspec(getattr(klass, '__init__')) - if argspec.defaults: - end_index = -len(argspec.defaults) - required_positional_args = argspec.args[1:end_index] - for index, req_positional_arg in enumerate(required_positional_args): - if keyword_args and req_positional_arg in keyword_args: - positional_args.append(keyword_args[req_positional_arg]) - del keyword_args[req_positional_arg] - elif (not keyword_args and index < len(used_data) and - isinstance(used_data, list)): - positional_args.append(used_data[index]) - instance = klass(*positional_args, **keyword_args) - if hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache index 082f4bddc43..2513d6b3f86 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache @@ -7,14 +7,29 @@ import re # noqa: F401 import six # noqa: F401 -from {{packageName}}.exceptions import ApiValueError # noqa: F401 +from {{packageName}}.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from {{packageName}}.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) - +{{#models}}{{#model}}{{#imports}}{{.}} +{{/imports}}{{/model}}{{/models}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache index 16592869b74..79abbf61300 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache @@ -1,12 +1,26 @@ {{#models}}{{#model}}# {{classname}} +{{#description}}{{&description}} +{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#requiredVars}}{{^defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{#isReadOnly}}[readonly] {{/isReadOnly}} -{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}defaults to {{{.}}}{{/defaultValue}} -{{/defaultValue}}{{/requiredVars}}{{#optionalVars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | [optional] {{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} +{{#requiredVars}} +{{^defaultValue}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{#isReadOnly}}[readonly] {{/isReadOnly}} +{{/defaultValue}} +{{/requiredVars}} +{{#requiredVars}} +{{#defaultValue}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}defaults to {{{.}}}{{/defaultValue}} +{{/defaultValue}} +{{/requiredVars}} +{{#optionalVars}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | [optional] {{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} {{/optionalVars}} +{{#additionalPropertiesType}} +**any string name** | **{{additionalPropertiesType}}** | any string name can be used but the value must be the correct type | [optional] +{{/additionalPropertiesType}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_allowed.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_allowed.mustache index 6ed39521f66..2414be114a3 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_allowed.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_allowed.mustache @@ -1,5 +1,5 @@ allowed_values = { -{{#vars}} +{{#allVars}} {{#isEnum}} ('{{name}}',): { {{#isNullable}} @@ -7,10 +7,10 @@ {{/isNullable}} {{#allowableValues}} {{#enumVars}} - '{{name}}': {{{value}}}{{^-last}},{{/-last}} + '{{name}}': {{{value}}}, {{/enumVars}} {{/allowableValues}} }, {{/isEnum}} -{{/vars}} +{{/allVars}} } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_openapi_validations.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_openapi_validations.mustache index 7e89f83ef26..1cc7b585507 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_openapi_validations.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvar_openapi_validations.mustache @@ -1,25 +1,42 @@ openapi_types = { -{{#vars}} - '{{name}}': '{{{dataType}}}'{{#hasMore}},{{/hasMore}} -{{/vars}} +{{#allVars}} + '{{name}}': ({{{dataType}}},), # noqa: E501 +{{/allVars}} } validations = { -{{#vars}} +{{#allVars}} {{#hasValidation}} ('{{name}}',): { {{#maxLength}} - 'max_length': {{maxLength}},{{/maxLength}}{{#minLength}} - 'min_length': {{minLength}},{{/minLength}}{{#maxItems}} - 'max_items': {{maxItems}},{{/maxItems}}{{#minItems}} - 'min_items': {{minItems}},{{/minItems}}{{#maximum}} - {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}'inclusive_maximum'{{^exclusiveMaximum}}{{/exclusiveMaximum}}: {{maximum}},{{/maximum}}{{#minimum}} - {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}'inclusive_minimum'{{^exclusiveMinimum}}{{/exclusiveMinimum}}: {{minimum}},{{/minimum}}{{#pattern}} + 'max_length': {{maxLength}}, +{{/maxLength}} +{{#minLength}} + 'min_length': {{minLength}}, +{{/minLength}} +{{#maxItems}} + 'max_items': {{maxItems}}, +{{/maxItems}} +{{#minItems}} + 'min_items': {{minItems}}, +{{/minItems}} +{{#maximum}} + {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}'inclusive_maximum'{{^exclusiveMaximum}}{{/exclusiveMaximum}}: {{maximum}}, +{{/maximum}} +{{#minimum}} + {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}'inclusive_minimum'{{^exclusiveMinimum}}{{/exclusiveMinimum}}: {{minimum}}, +{{/minimum}} +{{#pattern}} 'regex': { 'pattern': r'{{{vendorExtensions.x-regex}}}', # noqa: E501{{#vendorExtensions.x-modifiers}} {{#-first}}'flags': (re.{{.}}{{/-first}}{{^-first}} re.{{.}}{{/-first}}{{^-last}} | {{/-last}}{{#-last}}){{/-last}}{{/vendorExtensions.x-modifiers}} - },{{/pattern}} + }, +{{/pattern}} }, {{/hasValidation}} -{{/vars}} - } \ No newline at end of file +{{/allVars}} + } + + additional_properties_type = {{#additionalPropertiesType}}({{{additionalPropertiesType}}},) # noqa: E501{{/additionalPropertiesType}}{{^additionalPropertiesType}}None{{/additionalPropertiesType}} + + discriminator = {{#discriminator}}'{{{discriminatorName}}}'{{/discriminator}}{{^discriminator}}None{{/discriminator}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache index 46dc1afefc4..03eec953f37 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache @@ -4,4 +4,6 @@ and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. \ No newline at end of file + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/methods_init_properties.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/methods_init_properties.mustache index 447aa22cacd..dab632efab0 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/methods_init_properties.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/methods_init_properties.mustache @@ -1,76 +1,126 @@ - def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 - """{{classname}} - a model defined in OpenAPI""" # noqa: E501 -{{#vars}}{{#-first}} -{{/-first}} - self._{{name}} = None -{{/vars}} - self.discriminator = {{#discriminator}}'{{{discriminatorName}}}'{{/discriminator}}{{^discriminator}}None{{/discriminator}} -{{#vars}}{{#-first}} -{{/-first}} -{{#required}} - self.{{name}} = {{name}} -{{/required}} -{{^required}} -{{#isNullable}} - self.{{name}} = {{name}} -{{/isNullable}} -{{^isNullable}} - if {{name}} is not None: - self.{{name}} = ( - {{name}} + def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}, {{name}}={{{defaultValue}}}{{/defaultValue}}{{/requiredVars}}, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """{{classname}} - a model defined in OpenAPI + +{{#requiredVars}}{{^hasMore}} Args:{{/hasMore}}{{/requiredVars}}{{#requiredVars}}{{^defaultValue}} + {{name}} ({{{dataType}}}):{{#description}} {{description}}{{/description}}{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{^hasMore}} +{{/hasMore}}{{/requiredVars}} + Keyword Args:{{#requiredVars}}{{#defaultValue}} + {{name}} ({{{dataType}}}):{{#description}} {{description}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}] # noqa: E501{{/defaultValue}}{{/requiredVars}} + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done.{{#optionalVars}} + {{name}} ({{{dataType}}}):{{#description}} {{description}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501{{/optionalVars}} + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + +{{#requiredVars}} + self.__set_item('{{name}}', {{name}}) +{{/requiredVars}} + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) -{{/isNullable}} -{{/required}} -{{/vars}} -{{#vars}} + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) +{{#allVars}} @property def {{name}}(self): """Gets the {{name}} of this {{classname}}. # noqa: E501 - {{#description}} {{{description}}} # noqa: E501 {{/description}} - :return: The {{name}} of this {{classname}}. # noqa: E501 - :rtype: {{dataType}} + Returns: + ({{{dataType}}}): The {{name}} of this {{classname}}. # noqa: E501 """ - return self._{{name}} + return self.__get_item('{{name}}') @{{name}}.setter - def {{name}}(self, {{name}}): # noqa: E501 - """Sets the {{name}} of this {{classname}}. - + def {{name}}(self, value): + """Sets the {{name}} of this {{classname}}. # noqa: E501 {{#description}} {{{description}}} # noqa: E501 {{/description}} - - :param {{name}}: The {{name}} of this {{classname}}. # noqa: E501 - :type: {{dataType}} """ -{{^isNullable}} -{{#required}} - if {{name}} is None: - raise ApiValueError("Invalid value for `{{name}}`, must not be `None`") # noqa: E501 -{{/required}} -{{/isNullable}} -{{#isEnum}} - check_allowed_values( - self.allowed_values, - ('{{name}}',), - {{name}}, - self.validations - ) -{{/isEnum}} -{{#hasValidation}} - check_validations( - self.validations, - ('{{name}}',), - {{name}} - ) -{{/hasValidation}} - - self._{{name}} = ( - {{name}} - ) -{{/vars}} \ No newline at end of file + return self.__set_item('{{name}}', value) +{{/allVars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_normal.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_normal.mustache index bd1eaddcb40..c4e707e036e 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_normal.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_normal.mustache @@ -16,14 +16,14 @@ class {{classname}}(ModelNormal): {{> python-experimental/model_templates/classvar_allowed }} attribute_map = { -{{#vars}} +{{#allVars}} '{{name}}': '{{baseName}}'{{#hasMore}},{{/hasMore}} # noqa: E501 -{{/vars}} +{{/allVars}} } {{#discriminator}} discriminator_value_class_map = { - {{#children}}'{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}}, + {{#children}}'{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': {{{classname}}}{{^-last}}, {{/-last}}{{/children}} } {{/discriminator}} @@ -32,36 +32,19 @@ class {{classname}}(ModelNormal): {{> python-experimental/model_templates/methods_init_properties }} {{#discriminator}} - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_key = self.attribute_map[self.discriminator] + @classmethod + def get_real_child_model(cls, data): + """Returns the real base class specified by the discriminator + We assume that data has javascript keys + """ + discriminator_key = cls.attribute_map[cls.discriminator] discriminator_value = data[discriminator_key] - return self.discriminator_value_class_map.get(discriminator_value) + return cls.discriminator_value_class_map.get(discriminator_value) {{/discriminator}} def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -76,7 +59,22 @@ class {{classname}}(ModelNormal): if not isinstance(other, {{classname}}): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_simple.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_simple.mustache index 94ad6336f9c..b5939d926c2 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/model_simple.mustache @@ -16,7 +16,7 @@ class {{classname}}(ModelSimple): {{> python-experimental/model_templates/methods_init_properties }} def to_str(self): """Returns the string representation of the model""" - return str(self._value) + return str(self.value) def __repr__(self): """For `print` and `pprint`""" @@ -27,7 +27,19 @@ class {{classname}}(ModelSimple): if not isinstance(other, {{classname}}): return False - return self.__dict__ == other.__dict__ + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not six.PY3 and len(types) == 2 and unicode in types: # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index c251879b104..101b5466c31 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -1,13 +1,162 @@ # coding: utf-8 {{>partial_header}} + +import copy +from datetime import date, datetime # noqa: F401 +import inspect +import os import re +import tempfile -from {{packageName}}.exceptions import ApiValueError +from dateutil.parser import parse +import six + +from {{packageName}}.exceptions import ( + ApiKeyError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +if six.PY3: + import io + file_type = io.IOBase + # these are needed for when other modules import str and int from here + str = str + int = int +else: + file_type = file # noqa: F821 + str_py2 = str + unicode_py2 = unicode # noqa: F821 + long_py2 = long # noqa: F821 + int_py2 = int + # this requires that the future library is installed + from builtins import int, str -def check_allowed_values(allowed_values, input_variable_path, input_values, - validations): +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + +COERCION_INDEX_BY_TYPE = { + ModelNormal: 0, + ModelSimple: 1, + none_type: 2, + list: 3, + dict: 4, + float: 5, + int: 6, + bool: 7, + datetime: 8, + date: 9, + str: 10, + file_type: 11, +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + # for python2 input_value==long_instance -> return int + # where int is the python3 int backport + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif (six.PY2 and isinstance(input_value, (str_py2, unicode_py2, str)) or + isinstance(input_value, str)): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): """Raises an exception if the input_values are not allowed Args: @@ -15,14 +164,9 @@ def check_allowed_values(allowed_values, input_variable_path, input_values, input_variable_path (tuple): the path to the input variable input_values (list/str/int/float/date/datetime): the values that we are checking to see if they are in allowed_values - validations (dict): the validations dict """ - min_collection_length = ( - validations.get(input_variable_path, {}).get('min_length') or - validations.get(input_variable_path, {}).get('min_items', 0)) these_allowed_values = list(allowed_values[input_variable_path].values()) if (isinstance(input_values, list) - and len(input_values) > min_collection_length and not set(input_values).issubset( set(these_allowed_values))): invalid_values = ", ".join( @@ -36,7 +180,6 @@ def check_allowed_values(allowed_values, input_variable_path, input_values, ) ) elif (isinstance(input_values, dict) - and len(input_values) > min_collection_length and not set( input_values.keys()).issubset(set(these_allowed_values))): invalid_values = ", ".join( @@ -111,8 +254,21 @@ def check_validations(validations, input_variable_path, input_values): ) ) + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + if ('exclusive_maximum' in current_validations and - input_values >= current_validations['exclusive_maximum']): + max_val >= current_validations['exclusive_maximum']): raise ApiValueError( "Invalid value for `%s`, must be a value less than `%s`" % ( input_variable_path[0], @@ -121,7 +277,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('inclusive_maximum' in current_validations and - input_values > current_validations['inclusive_maximum']): + max_val > current_validations['inclusive_maximum']): raise ApiValueError( "Invalid value for `%s`, must be a value less than or equal to " "`%s`" % ( @@ -131,7 +287,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('exclusive_minimum' in current_validations and - input_values <= current_validations['exclusive_minimum']): + min_val <= current_validations['exclusive_minimum']): raise ApiValueError( "Invalid value for `%s`, must be a value greater than `%s`" % ( @@ -141,7 +297,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('inclusive_minimum' in current_validations and - input_values < current_validations['inclusive_minimum']): + min_val < current_validations['inclusive_minimum']): raise ApiValueError( "Invalid value for `%s`, must be a value greater than or equal " "to `%s`" % ( @@ -163,13 +319,550 @@ def check_validations(validations, input_variable_path, input_values): ) -class ModelSimple(object): - # the parent class of models whose type != object in their swagger/openapi - # spec - pass +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with classs information inside it + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with classs information inside it + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + return COERCION_INDEX_BY_TYPE[class_or_instance] + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types -class ModelNormal(object): - # the parent class of models whose type == object in their swagger/openapi - # spec - pass +def remove_uncoercible(required_types_classes, current_item, from_server, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + from_server (bool): a boolean of whether the data is from the server + if false, the data is from the client + current_item (any): the current item to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[from_server]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + + +def get_required_type_classes(required_types_mixed): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (doct): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.append(required_type) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class + """ + + output_dict = {} + reversed_attr_map = {value: key for key, value in + six.iteritems(model_class.attribute_map)} + for javascript_key, value in six.iteritems(input_dict): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError): + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), get_py3_class_name(klass) + ), + path_to_item=path_to_item + ) + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, from_server): + """Deserializes model_data to model instance. + + Args: + model_data (list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + from_server (bool): True if the data is from the server + False if the data is from the client + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + fixed_model_data = copy.deepcopy(model_data) + + if isinstance(fixed_model_data, dict): + fixed_model_data = change_keys_js_to_python(fixed_model_data, + model_class) + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _from_server=from_server) + + if hasattr(model_class, 'get_real_child_model'): + # discriminator case + discriminator_class = model_class.get_real_child_model(model_data) + if discriminator_class: + if isinstance(model_data, list): + instance = discriminator_class(*model_data, **kw_args) + elif isinstance(model_data, dict): + fixed_model_data = change_keys_js_to_python( + fixed_model_data, + discriminator_class + ) + kw_args.update(fixed_model_data) + instance = discriminator_class(**kw_args) + else: + # all other cases + if isinstance(model_data, list): + instance = model_class(*model_data, **kw_args) + if isinstance(model_data, dict): + fixed_model_data = change_keys_js_to_python(fixed_model_data, + model_class) + kw_args.update(fixed_model_data) + instance = model_class(**kw_args) + else: + instance = model_class(model_data, **kw_args) + + return instance + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if six.PY3 and isinstance(response_data, str): + # in python3 change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, from_server, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + from_server (bool): True if data is from the server, False is data is + from the client + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelNormal and ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, from_server) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, from_server) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + from_server, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + from_server (bool): True if data is from the server + False if data is from the client + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = input_class_simple in set(valid_classes) + if not valid_type: + if configuration: + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + from_server, + key_type=False, + must_convert=True + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, from_server, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + from_server, + key_type=False, + must_convert=False + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + from_server, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in six.iteritems(input_value): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + from_server, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + for attr, value in six.iteritems(model_instance._data_store): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + attr = model_instance.attribute_map.get(attr, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: model_to_dict(x, serialize=serialize) + if hasattr(x, '_data_store') else x, value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], + model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], '_data_store') else item, + value.items() + )) + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + Note: Adds the extra valid classes in python2 + """ + all_classes = list(input_classes) + if six.PY2 and str in input_classes: + all_classes.extend([str_py2, unicode_py2]) + if six.PY2 and int in input_classes: + all_classes.extend([int_py2, long_py2]) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_py3_class_name(input_class): + if six.PY2: + if input_class == str: + return 'str' + elif input_class == int: + return 'int' + return input_class.__name__ diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/requirements.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/requirements.mustache new file mode 100644 index 00000000000..eb358efd5bd --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/requirements.mustache @@ -0,0 +1,6 @@ +certifi >= 14.05.14 +future; python_version<="2.7" +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache new file mode 100644 index 00000000000..bf9ffe07d08 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache @@ -0,0 +1,47 @@ +# coding: utf-8 + +{{>partial_header}} + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "{{{projectName}}}" +VERSION = "{{packageVersion}}" +{{#apiInfo}} +{{#apis}} +{{^hasMore}} +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] +{{#asyncio}} +REQUIRES.append("aiohttp >= 3.0.0") +{{/asyncio}} +{{#tornado}} +REQUIRES.append("tornado>=4.2,<5") +{{/tornado}} +EXTRAS = {':python_version <= "2.7"': ['future']} + +setup( + name=NAME, + version=VERSION, + description="{{appName}}", + author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", + url="{{packageUrl}}", + keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], + install_requires=REQUIRES, + extras_require=EXTRAS, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + {{#licenseInfo}}license="{{licenseInfo}}", + {{/licenseInfo}}long_description="""\ + {{appDescription}} # noqa: E501 + """ +) +{{/hasMore}} +{{/apis}} +{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache new file mode 100644 index 00000000000..023ff960788 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache @@ -0,0 +1,13 @@ +{{^asyncio}} +coverage>=4.0.3 +nose>=1.3.7 +{{/asyncio}} +{{#asyncio}} +pytest>=3.6.0 +pytest-cov>=2.6.1 +{{/asyncio}} +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 +mock; python_version<="2.7" + diff --git a/modules/openapi-generator/src/main/resources/python/requirements.mustache b/modules/openapi-generator/src/main/resources/python/requirements.mustache index bafdc07532f..eb358efd5bd 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/requirements.mustache @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index 588851cc7b0..a41fee14674 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -28,13 +28,15 @@ setup( name=NAME, version=VERSION, description="{{appName}}", - author_email="{{infoEmail}}", + author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description="""\ + {{#licenseInfo}}license="{{licenseInfo}}", + {{/licenseInfo}}long_description="""\ {{appDescription}} # noqa: E501 """ ) diff --git a/modules/openapi-generator/src/main/resources/r/description.mustache b/modules/openapi-generator/src/main/resources/r/description.mustache index f4d5756752c..42a07916a3d 100644 --- a/modules/openapi-generator/src/main/resources/r/description.mustache +++ b/modules/openapi-generator/src/main/resources/r/description.mustache @@ -1,11 +1,11 @@ Package: {{{packageName}}} Title: R Package Client for {{{appName}}} Version: {{packageVersion}} -Authors@R: person("OpenAPI Generator community", email = "team@openapitools.org", role = c("aut", "cre")) +Authors@R: person("{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", email = "{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", role = c("aut", "cre")) Description: {{{appDescription}}}{{^appDescription}}R Package Client for {{{appName}}}{{/appDescription}} Depends: R (>= 3.3.3) Encoding: UTF-8 -License: Unlicense +License: {{#licenseInfo}}{{licenseInfo}}{{/licenseInfo}}{{^licenseInfo}}Unlicense{{/licenseInfo}} LazyData: true Suggests: testthat Imports: jsonlite, httr, R6, caTools{{#useRlangExceptionHandling}}, rlang{{/useRlangExceptionHandling}} diff --git a/modules/openapi-generator/src/main/resources/r/model_doc.mustache b/modules/openapi-generator/src/main/resources/r/model_doc.mustache index e24917d02d7..f4649bb8867 100644 --- a/modules/openapi-generator/src/main/resources/r/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_doc.mustache @@ -1,5 +1,7 @@ {{#models}}{{#model}}# {{packageName}}::{{classname}} +{{#description}}{{&description}} +{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache index f71be5049a5..23031126023 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache @@ -1,3 +1,3 @@ github "Alamofire/Alamofire" ~> 4.9.0{{#usePromiseKit}} -github "mxcl/PromiseKit" ~> 4.4{{/usePromiseKit}}{{#useRxSwift}} -github "ReactiveX/RxSwift" ~> 4.0{{/useRxSwift}} +github "mxcl/PromiseKit" ~> 6.11.0{{/usePromiseKit}}{{#useRxSwift}} +github "ReactiveX/RxSwift" ~> 4.5.0{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache index 61d55e8afec..a4ed6ae9c02 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache @@ -182,9 +182,9 @@ extension KeyedDecodingContainerProtocol { let deferred = Promise>.pending() self.execute { (response: Response?, error: Error?) in if let response = response { - deferred.fulfill(response) + deferred.resolver.fulfill(response) } else { - deferred.reject(error!) + deferred.resolver.reject(error!) } } return deferred.promise diff --git a/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache new file mode 100644 index 00000000000..3ca1dfcbfa2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache @@ -0,0 +1,33 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "{{projectName}}", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "{{projectName}}", + targets: ["{{projectName}}"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + {{#usePromiseKit}} + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0"), + {{/usePromiseKit}} + {{#useRxSwift}} + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0"), + {{/useRxSwift}} + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "{{projectName}}", + dependencies: ["Alamofire"{{#usePromiseKit}}, "PromiseKit"{{/usePromiseKit}}{{#useRxSwift}}, "RxSwift"{{/useRxSwift}}], + path: "{{projectName}}/Classes" + ), + ] +) diff --git a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache index e147c0d1ef5..e7377c7a22f 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache @@ -29,10 +29,10 @@ Pod::Spec.new do |s| {{/podDocumentationURL}} s.source_files = '{{projectName}}/Classes/**/*.swift' {{#usePromiseKit}} - s.dependency 'PromiseKit/CorePromise', '~> 4.4.0' + s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' {{/usePromiseKit}} {{#useRxSwift}} - s.dependency 'RxSwift', '~> 4.0' + s.dependency 'RxSwift', '~> 4.5.0' {{/useRxSwift}} s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/modules/openapi-generator/src/main/resources/swift4/api.mustache b/modules/openapi-generator/src/main/resources/swift4/api.mustache index c6eeab2d97e..813518bfb05 100644 --- a/modules/openapi-generator/src/main/resources/swift4/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/api.mustache @@ -70,16 +70,16 @@ open class {{classname}} { let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) {{#returnType}} } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() {{/returnType}} {{^returnType}} } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) {{/returnType}} } } diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache index 06dad036e62..e10080d0205 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache @@ -17,18 +17,18 @@ import { {{classname}} } from './{{importPath}}'; {{#apiInfo}}{{#apis}}{{classname}}{{#hasMore}}, {{/hasMore}}{{/apis}}{{/apiInfo}} ] }) -export class ApiModule { +export class {{apiModuleClassName}} { public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { return { - ngModule: ApiModule, + ngModule: {{apiModuleClassName}}, providers: [ { provide: Configuration, useFactory: configurationFactory } ] }; } - constructor( @Optional() @SkipSelf() parentModule: ApiModule, + constructor( @Optional() @SkipSelf() parentModule: {{apiModuleClassName}}, @Optional() http: {{#useHttpClient}}HttpClient{{/useHttpClient}}{{^useHttpClient}}Http{{/useHttpClient}}) { if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + throw new Error('{{apiModuleClassName}} is already loaded. Import in your base AppModule only.'); } if (!http) { throw new Error('You need to import the {{#useHttpClient}}HttpClientModule{{/useHttpClient}}{{^useHttpClient}}HttpModule{{/useHttpClient}} in your AppModule! \n' + diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index 1db1321381b..1ab70a7427c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -182,7 +182,7 @@ export class {{classname}} { {{^isListContainer}} if ({{paramName}} !== undefined && {{paramName}} !== null) { {{#isDateTime}} - {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{baseName}}', {{paramName}}.toISOString()); + {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{baseName}}', ({{paramName}} as any instanceof Date) ? ({{paramName}} as any).toISOString().substr(0, 10) : {{paramName}}); {{/isDateTime}} {{^isDateTime}} {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{baseName}}', {{paramName}}); diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache index 0afee532731..461d2e6a89f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache @@ -2,7 +2,7 @@ {{#models}} {{#model}} {{#tsImports}} -import { {{classname}} } from './{{filename}}'; +import { {{classname}} } from '{{filename}}'; {{/tsImports}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/models.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/models.mustache index 02a39c248c4..995ffee1621 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/models.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/models.mustache @@ -1,5 +1,5 @@ {{#models}} {{#model}} -export * from './{{{ classFilename }}}'; +export * from '{{{ classFilename }}}'; {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index 8165cd51077..de8ce193d87 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -1,5 +1,4 @@ // tslint:disable -/// {{>licenseInfo}} {{^withSeparateModelsAndApi}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 7e776e3f2ea..3f625aca23d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -1,6 +1,5 @@ {{#withSeparateModelsAndApi}} // tslint:disable -/// {{>licenseInfo}} import * as globalImportUrl from 'url'; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index b5536db72b6..5ff1902dd45 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -1,5 +1,4 @@ // tslint:disable -/// {{>licenseInfo}} import { Configuration } from "./configuration"; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/custom.d.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/custom.d.mustache deleted file mode 100644 index 32534cb1663..00000000000 --- a/modules/openapi-generator/src/main/resources/typescript-axios/custom.d.mustache +++ /dev/null @@ -1 +0,0 @@ -declare module 'url'; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache index 711a1e0f16b..a460d5ce588 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache @@ -1,5 +1,4 @@ // tslint:disable -/// {{>licenseInfo}} {{#withSeparateModelsAndApi}}{{#imports}} import { {{class}} } from './{{filename}}';{{/imports}}{{/withSeparateModelsAndApi}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index ef009759ab6..99e63c25d5a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -21,8 +21,8 @@ "axios": "^0.18.0" }, "devDependencies": { - "@types/node": "^8.0.9", - "typescript": "^2.4" + "@types/node": "^12.11.5", + "typescript": "^3.6.4" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig": { diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache index b2975124edb..013bf40a47b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache @@ -49,7 +49,7 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole {{#discriminator}} if (!ignoreDiscriminator) { {{#discriminator.mappedModels}} - if (json['{{discriminator.propertyName}}'] === '{{modelName}}') { + if (json['{{discriminator.propertyName}}'] === '{{mappingName}}') { return {{modelName}}FromJSONTyped(json, true); } {{/discriminator.mappedModels}} diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache index a44d76453ca..23c9363ff34 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache @@ -51,6 +51,12 @@ class HttpClient implements IHttpClient { }; private performNetworkCall(url: string, method: string, body?: any, headers?: Headers): Observable { + + // when using fetch & a multipart upload, the requests content-type is handled by the browser, so should be left unset otherwise the multipart boundry is not added + if(headers && headers["Content-Type"] === "multipart/form-data") { + delete headers["Content-Type"]; + } + let promise = window.fetch(url, { method: method, body: body, diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache index 033de44d80b..1e1c87b7525 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache @@ -152,7 +152,12 @@ export class {{classname}} { {{#hasFormParams}} let formData: FormData = new FormData(); + {{#isMultipart}} + headers['Content-Type'] = 'multipart/form-data'; + {{/isMultipart}} + {{^isMultipart}} headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; + {{/isMultipart}} {{#formParams}} {{#isListContainer}} if ({{paramName}}) { @@ -174,7 +179,7 @@ export class {{classname}} { {{/formParams}} {{/hasFormParams}} - const response: Observable> = this.httpClient.{{httpMethod}}(`${this.basePath}{{{path}}}{{#hasQueryParams}}?${queryParameters.join('&')}{{/hasQueryParams}}`{{#bodyParam}}, {{paramName}} {{/bodyParam}}{{#hasFormParams}}, body{{/hasFormParams}}, headers); + const response: Observable> = this.httpClient.{{httpMethod}}(`${this.basePath}{{{path}}}{{#hasQueryParams}}?${queryParameters.join('&')}{{/hasQueryParams}}`{{#bodyParam}}, {{paramName}} {{/bodyParam}}{{#hasFormParams}}, formData{{/hasFormParams}}, headers); if (observe == 'body') { return response.pipe( map(httpResponse => <{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>(httpResponse.response)) diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache index 182f2f09b37..f27bfde09e4 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache @@ -22,7 +22,7 @@ import { Configuration } from '../configuration'; export class {{classname}} { protected basePath = '{{{basePath}}}'; public defaultHeaders: Array = []; - public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = null; + public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = undefined; public configuration: Configuration = new Configuration(); constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { @@ -37,7 +37,7 @@ export class {{classname}} { } } - private extendObj(objA: T2, objB: T2): T1|T2 { + private extendObj(objA: T2, objB: T2): T1|T2 { for (let key in objB) { if (objB.hasOwnProperty(key)) { objA[key] = objB[key]; diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/configuration.mustache index a566a180e4e..658e6ad5f61 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/configuration.mustache @@ -1,6 +1,6 @@ export class Configuration { - apiKey: string; - username: string; - password: string; - accessToken: string | (() => string); + apiKey: string | undefined; + username: string | undefined; + password: string | undefined; + accessToken: string | (() => string) | undefined; } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache index 0c70dc5e6ca..3c548d7b547 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache @@ -86,7 +86,7 @@ export class {{classname}} extends BaseAPI { {{/hasHttpHeaders}} {{#hasQueryParams}} - const query: HttpQuery = { + const query: HttpQuery = { {{#queryParams}} {{#isListContainer}} {{#isCollectionFormatMulti}} diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache index 555ee5aad66..7c58be70a52 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache @@ -140,7 +140,7 @@ export const COLLECTION_FORMATS = { export type Json = any; export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HttpHeaders = { [key: string]: string }; -export type HttpQuery = { [key: string]: string | number | null | boolean | Array }; +export type HttpQuery = Partial<{ [key: string]: string | number | null | boolean | Array }>; // partial is needed for strict mode export type HttpBody = Json | FormData; export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index e9965da1744..8914a7edfdb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -27,7 +27,6 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.headers.Header; import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.QueryParameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; @@ -43,13 +42,11 @@ import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - import java.util.*; import java.util.stream.Collectors; +import static org.testng.Assert.*; + public class DefaultCodegenTest { @@ -1003,4 +1000,35 @@ public class DefaultCodegenTest { assertEquals(codegen.toApiName(""), "DefaultApi"); } + public static class FromParameter { + private CodegenParameter codegenParameter(String path) { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/fromParameter.yaml"); + new InlineModelResolver().flatten(openAPI); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + return codegen + .fromParameter( + openAPI + .getPaths() + .get(path) + .getGet() + .getParameters() + .get(0), + new HashSet<>() + ); + } + + @Test + public void setStyle() { + CodegenParameter parameter = codegenParameter("/set_style"); + assertEquals("form", parameter.style); + } + + @Test + public void setShouldExplode() { + CodegenParameter parameter = codegenParameter("/set_should_explode"); + assertTrue(parameter.isExplode); + } + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java index f58c4e864ca..1ff66f0527b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java @@ -19,6 +19,7 @@ package org.openapitools.codegen.options; import com.google.common.collect.ImmutableMap; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.languages.HaskellServantCodegen; import java.util.Map; @@ -44,6 +45,7 @@ public class HaskellServantOptionsProvider implements OptionsProvider { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) + .put(HaskellServantCodegen.PROP_SERVE_STATIC, HaskellServantCodegen.PROP_SERVE_STATIC_DEFAULT.toString()) .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java new file mode 100644 index 00000000000..23de2476689 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java @@ -0,0 +1,69 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.options; + +import com.google.common.collect.ImmutableMap; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.languages.AbstractPhpCodegen; +import org.openapitools.codegen.languages.PhpSlim4ServerCodegen; + +import java.util.Map; + +public class PhpSlim4ServerOptionsProvider implements OptionsProvider { + public static final String MODEL_PACKAGE_VALUE = "package"; + public static final String API_PACKAGE_VALUE = "apiPackage"; + public static final String VARIABLE_NAMING_CONVENTION_VALUE = "camelCase"; + public static final String INVOKER_PACKAGE_VALUE = "OpenAPIServer"; + public static final String PACKAGE_NAME_VALUE = ""; + public static final String SRC_BASE_PATH_VALUE = "src"; + public static final String ARTIFACT_VERSION_VALUE = "1.0.0"; + public static final String SORT_PARAMS_VALUE = "false"; + public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; + public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; + public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; + public static final String PSR7_IMPLEMENTATION_VALUE = "zend-diactoros"; + + @Override + public String getLanguage() { + return "php-slim4"; + } + + @Override + public Map createOptions() { + ImmutableMap.Builder builder = new ImmutableMap.Builder(); + return builder.put(CodegenConstants.MODEL_PACKAGE, MODEL_PACKAGE_VALUE) + .put(AbstractPhpCodegen.VARIABLE_NAMING_CONVENTION, VARIABLE_NAMING_CONVENTION_VALUE) + .put(AbstractPhpCodegen.PACKAGE_NAME, PACKAGE_NAME_VALUE) + .put(AbstractPhpCodegen.SRC_BASE_PATH, SRC_BASE_PATH_VALUE) + .put(CodegenConstants.API_PACKAGE, API_PACKAGE_VALUE) + .put(CodegenConstants.INVOKER_PACKAGE, INVOKER_PACKAGE_VALUE) + .put(CodegenConstants.ARTIFACT_VERSION, ARTIFACT_VERSION_VALUE) + .put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE) + .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) + .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) + .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) + .put(PhpSlim4ServerCodegen.PSR7_IMPLEMENTATION, PSR7_IMPLEMENTATION_VALUE) + .build(); + } + + @Override + public boolean isServer() { + return true; + } +} + diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index d464a532a0e..b18d05bdace 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -36,6 +36,7 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider { public static final String NG_VERSION = "2"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; public static final String FILE_NAMING_VALUE = "camelCase"; + public static final String API_MODULE_PREFIX = ""; public static String SERVICE_SUFFIX = "Service"; public static String SERVICE_FILE_SUFFIX = ".service"; public static String MODEL_SUFFIX = ""; @@ -62,6 +63,7 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider { .put(TypeScriptAngularClientCodegen.TAGGED_UNIONS, Boolean.FALSE.toString()) .put(TypeScriptAngularClientCodegen.NPM_REPOSITORY, NPM_REPOSITORY) .put(TypeScriptAngularClientCodegen.NG_VERSION, NG_VERSION) + .put(TypeScriptAngularClientCodegen.API_MODULE_PREFIX, API_MODULE_PREFIX) .put(TypeScriptAngularClientCodegen.SERVICE_SUFFIX, SERVICE_SUFFIX) .put(TypeScriptAngularClientCodegen.SERVICE_FILE_SUFFIX, SERVICE_FILE_SUFFIX) .put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, MODEL_SUFFIX) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java new file mode 100644 index 00000000000..d85652ee4b2 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java @@ -0,0 +1,296 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.python; + +import com.google.common.collect.Sets; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.parser.util.SchemaTypeUtil; +import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.PythonClientExperimentalCodegen; +import org.testng.Assert; +import org.testng.annotations.Test; + +@SuppressWarnings("static-method") +public class PythonClientExperimentalTest { + + @Test(description = "convert a python model with dots") + public void modelTest() { + final OpenAPI openAPI= TestUtils.parseSpec("src/test/resources/2_0/v1beta3.json"); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + codegen.setOpenAPI(openAPI); + + codegen.setOpenAPI(openAPI); + final CodegenModel simpleName = codegen.fromModel("v1beta3.Binding", openAPI.getComponents().getSchemas().get("v1beta3.Binding")); + Assert.assertEquals(simpleName.name, "v1beta3.Binding"); + Assert.assertEquals(simpleName.classname, "V1beta3Binding"); + Assert.assertEquals(simpleName.classVarName, "v1beta3_binding"); + + codegen.setOpenAPI(openAPI); + final CodegenModel compoundName = codegen.fromModel("v1beta3.ComponentStatus", openAPI.getComponents().getSchemas().get("v1beta3.ComponentStatus")); + Assert.assertEquals(compoundName.name, "v1beta3.ComponentStatus"); + Assert.assertEquals(compoundName.classname, "V1beta3ComponentStatus"); + Assert.assertEquals(compoundName.classVarName, "v1beta3_component_status"); + + final String path = "/api/v1beta3/namespaces/{namespaces}/bindings"; + final Operation operation = openAPI.getPaths().get(path).getPost(); + final CodegenOperation codegenOperation = codegen.fromOperation(path, "get", operation, null); + Assert.assertEquals(codegenOperation.returnType, "V1beta3Binding"); + Assert.assertEquals(codegenOperation.returnBaseType, "V1beta3Binding"); + } + + @Test(description = "convert a simple java model") + public void simpleModelTest() { + final Schema schema = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperties("name", new StringSchema()) + .addProperties("createdAt", new DateTimeSchema()) + .addRequiredItem("id") + .addRequiredItem("name"); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 3); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.dataType, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.hasMore); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "name"); + Assert.assertEquals(property2.dataType, "str"); + Assert.assertEquals(property2.name, "name"); + Assert.assertNull(property2.defaultValue); + Assert.assertEquals(property2.baseType, "str"); + Assert.assertTrue(property2.hasMore); + Assert.assertTrue(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + + final CodegenProperty property3 = cm.vars.get(2); + Assert.assertEquals(property3.baseName, "createdAt"); + Assert.assertEquals(property3.dataType, "datetime"); + Assert.assertEquals(property3.name, "created_at"); + Assert.assertNull(property3.defaultValue); + Assert.assertEquals(property3.baseType, "datetime"); + Assert.assertFalse(property3.hasMore); + Assert.assertFalse(property3.required); + } + + @Test(description = "convert a model with list property") + public void listPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperties("urls", new ArraySchema() + .items(new StringSchema())) + .addRequiredItem("id"); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 2); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.dataType, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.hasMore); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "urls"); + Assert.assertEquals(property2.dataType, "[str]"); + Assert.assertEquals(property2.name, "urls"); + Assert.assertNull(property2.defaultValue); + Assert.assertEquals(property2.baseType, "list"); + Assert.assertFalse(property2.hasMore); + Assert.assertEquals(property2.containerType, "array"); + Assert.assertFalse(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertTrue(property2.isContainer); + } + + @Test(description = "convert a model with a map property") + public void mapPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("translations", new MapSchema() + .additionalProperties(new StringSchema())) + .addRequiredItem("id"); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "translations"); + Assert.assertEquals(property1.dataType, "{str: (str,)}"); + Assert.assertEquals(property1.name, "translations"); + Assert.assertEquals(property1.baseType, "dict"); + Assert.assertEquals(property1.containerType, "map"); + Assert.assertFalse(property1.required); + Assert.assertTrue(property1.isContainer); + Assert.assertTrue(property1.isPrimitiveType); + } + + @Test(description = "convert a model with complex property") + public void complexPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("children", new Schema().$ref("#/definitions/Children")); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.dataType, "Children"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "Children"); + Assert.assertFalse(property1.required); + Assert.assertFalse(property1.isContainer); + } + + @Test(description = "convert a model with complex list property") + public void complexListPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("children", new ArraySchema() + .items(new Schema().$ref("#/definitions/Children"))); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.dataType, "[Children]"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "list"); + Assert.assertEquals(property1.containerType, "array"); + Assert.assertFalse(property1.required); + Assert.assertTrue(property1.isContainer); + } + + @Test(description = "convert a model with complex map property") + public void complexMapPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("children", new MapSchema() + .additionalProperties(new Schema().$ref("#/definitions/Children"))); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.dataType, "{str: (Children,)}"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "dict"); + Assert.assertEquals(property1.containerType, "map"); + Assert.assertFalse(property1.required); + Assert.assertTrue(property1.isContainer); + } + + + // should not start with 'null'. need help from the community to investigate further + @Test(description = "convert an array model") + public void arrayModelTest() { + final Schema model = new ArraySchema() + //.description() + .items(new Schema().$ref("#/definitions/Children")) + .description("an array model"); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "an array model"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "list"); + Assert.assertEquals(cm.imports.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + } + + // should not start with 'null'. need help from the community to investigate further + @Test(description = "convert a map model") + public void mapModelTest() { + final Schema model = new Schema() + .description("a map model") + .additionalProperties(new Schema().$ref("#/definitions/Children")); + final DefaultCodegen codegen = new PythonClientExperimentalCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a map model"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "dict"); + Assert.assertEquals(cm.imports.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + } + +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonTest.java index 7a2a37f4132..5d606847a28 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonTest.java @@ -294,4 +294,4 @@ public class PythonTest { Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); } -} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerCodegenTest.java new file mode 100644 index 00000000000..820ed851c01 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerCodegenTest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.slim4; + +import org.openapitools.codegen.languages.PhpSlim4ServerCodegen; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.io.File; + +public class PhpSlim4ServerCodegenTest { + + @Test + public void testEncodePath() { + final PhpSlim4ServerCodegen codegen = new PhpSlim4ServerCodegen(); + + Assert.assertEquals(codegen.encodePath("/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r/fake"), "/%20%27%20%22%20%3Dend%20--%20%5C%5Cr%5C%5Cn%20%5C%5Cn%20%5C%5Cr/v2%20*_/%20%27%20%22%20%3Dend%20--%20%5C%5Cr%5C%5Cn%20%5C%5Cn%20%5C%5Cr/fake"); + Assert.assertEquals(codegen.encodePath("/o\'\"briens/v2/o\'\"henry/fake"), "/o%27%22briens/v2/o%27%22henry/fake"); + Assert.assertEquals(codegen.encodePath("/comedians/Chris D\'Elia"), "/comedians/Chris%20D%27Elia"); + Assert.assertEquals(codegen.encodePath("/разработчики/Юрий Беленко"), "/%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B8/%D0%AE%D1%80%D0%B8%D0%B9%20%D0%91%D0%B5%D0%BB%D0%B5%D0%BD%D0%BA%D0%BE"); + Assert.assertEquals(codegen.encodePath("/text with multilines \\\n\\\t\\\r"), "/text%20with%20multilines%20%5C%5C%20%5C%5C%20%5C%5C"); + Assert.assertEquals(codegen.encodePath("/path with argument {value}"), "/path%20with%20argument%20{value}"); + + // few examples from Slim documentation + Assert.assertEquals(codegen.encodePath("/users[/{id}]"), "/users[/{id}]"); + Assert.assertEquals(codegen.encodePath("/news[/{year}[/{month}]]"), "/news[/{year}[/{month}]]"); + Assert.assertEquals(codegen.encodePath("/news[/{params:.*}]"), "/news[/{params:.*}]"); + Assert.assertEquals(codegen.encodePath("/users/{id:[0-9]+}"), "/users/{id:[0-9]+}"); + + // from FastRoute\RouteParser\Std.php + Assert.assertEquals(codegen.encodePath("/user/{name}[/{id:[0-9]+}]"), "/user/{name}[/{id:[0-9]+}]"); + Assert.assertEquals(codegen.encodePath("/fixedRoutePart/{varName}[/moreFixed/{varName2:\\d+}]"), "/fixedRoutePart/{varName}[/moreFixed/{varName2:\\d+}]"); + } + + @Test(dataProvider = "modelFileFolderProvider") + public void modelFileFolder(String modelPackage, String invokerPackage, String expected) { + final PhpSlim4ServerCodegen codegen = new PhpSlim4ServerCodegen(); + codegen.setModelPackage(modelPackage); + codegen.setInvokerPackage(invokerPackage); + + Assert.assertEquals(codegen.modelFileFolder(), expected); + } + + @DataProvider(name = "modelFileFolderProvider") + public Object[][] modelFileFolderProvider() { + return new Object[][] { + // {modelPackage, invokerPackage, expected} + {"Model", "Invoker", "generated-code/slim4/lib/Model".replace('/', File.separatorChar)}, + {"Petstore", "Petstore", "generated-code/slim4/lib".replace('/', File.separatorChar)}, + {"Package\\SubPackage\\Model", "Package\\SubPackage", "generated-code/slim4/lib/Model".replace('/', File.separatorChar)}, + {"Websupport\\InvoiceValidation\\Model", "Websupport\\InvoiceValidation", "generated-code/slim4/lib/Model".replace('/', File.separatorChar)}, + }; + } + + @Test(dataProvider = "apiFileFolderProvider") + public void apiFileFolder(String modelPackage, String invokerPackage, String expected) { + final PhpSlim4ServerCodegen codegen = new PhpSlim4ServerCodegen(); + codegen.setApiPackage(modelPackage); + codegen.setInvokerPackage(invokerPackage); + + Assert.assertEquals(codegen.apiFileFolder(), expected); + } + + @DataProvider(name = "apiFileFolderProvider") + public Object[][] apiFileFolderProvider() { + return new Object[][] { + // {apiPackage, invokerPackage, expected} + {"Api", "Invoker", "generated-code/slim4/lib/Api".replace('/', File.separatorChar)}, + {"Petstore", "Petstore", "generated-code/slim4/lib".replace('/', File.separatorChar)}, + {"Package\\SubPackage\\Api", "Package\\SubPackage", "generated-code/slim4/lib/Api".replace('/', File.separatorChar)}, + {"Websupport\\InvoiceValidation\\Api", "Websupport\\InvoiceValidation", "generated-code/slim4/lib/Api".replace('/', File.separatorChar)}, + }; + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerOptionsTest.java new file mode 100644 index 00000000000..fa45cb6fbcd --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim4/PhpSlim4ServerOptionsTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.slim4; + +import mockit.Expectations; +import mockit.Tested; +import org.openapitools.codegen.AbstractOptionsTest; +import org.openapitools.codegen.CodegenConfig; +import org.openapitools.codegen.languages.PhpSlim4ServerCodegen; +import org.openapitools.codegen.options.PhpSlim4ServerOptionsProvider; + +public class PhpSlim4ServerOptionsTest extends AbstractOptionsTest { + + @Tested + private PhpSlim4ServerCodegen clientCodegen; + + public PhpSlim4ServerOptionsTest() { + super(new PhpSlim4ServerOptionsProvider()); + } + + @Override + protected CodegenConfig getCodegenConfig() { + return clientCodegen; + } + + @SuppressWarnings("unused") + @Override + protected void setExpectations() { + new Expectations(clientCodegen) {{ + clientCodegen.setModelPackage(PhpSlim4ServerOptionsProvider.MODEL_PACKAGE_VALUE); + times = 1; + clientCodegen.setApiPackage(PhpSlim4ServerOptionsProvider.API_PACKAGE_VALUE); + times = 1; + clientCodegen.setParameterNamingConvention(PhpSlim4ServerOptionsProvider.VARIABLE_NAMING_CONVENTION_VALUE); + times = 1; + clientCodegen.setInvokerPackage(PhpSlim4ServerOptionsProvider.INVOKER_PACKAGE_VALUE); + times = 1; + clientCodegen.setPackageName(PhpSlim4ServerOptionsProvider.PACKAGE_NAME_VALUE); + times = 1; + clientCodegen.setSrcBasePath(PhpSlim4ServerOptionsProvider.SRC_BASE_PATH_VALUE); + times = 1; + clientCodegen.setArtifactVersion(PhpSlim4ServerOptionsProvider.ARTIFACT_VERSION_VALUE); + times = 1; + clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(PhpSlim4ServerOptionsProvider.SORT_PARAMS_VALUE)); + times = 1; + clientCodegen.setPsr7Implementation(PhpSlim4ServerOptionsProvider.PSR7_IMPLEMENTATION_VALUE); + times = 1; + }}; + } +} + diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java index 8adc9328ec5..b0489ac2218 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java @@ -22,7 +22,7 @@ public class TypeScriptAngularClientCodegenTest { codegen.additionalProperties().put("modelSuffix", "MySuffix"); codegen.processOpts(); - Assert.assertEquals("testNameMySuffix", codegen.toModelFilename("testName")); + Assert.assertEquals("./testNameMySuffix", codegen.toModelFilename("testName")); } @Test diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularModelTest.java index 77f89e537de..c12fed813de 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularModelTest.java @@ -196,6 +196,69 @@ public class TypeScriptAngularModelTest { Assert.assertEquals(cm.vars.size(), 0); } + @Test(description = "convert an array oneof model") + public void arrayOneOfModelTest() { + final Schema schema = new ArraySchema() + .items(new ComposedSchema() + .addOneOfItem(new StringSchema()) + .addOneOfItem(new IntegerSchema().format("int64"))) + .description("an array oneof model"); + final DefaultCodegen codegen = new TypeScriptAngularClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "an array oneof model"); + Assert.assertEquals(cm.arrayModelType, "string | number"); + Assert.assertEquals(cm.vars.size(), 0); + } + + @Test(description = "convert an any of with array oneof model") + public void objectPropertyAnyOfWithArrayOneOfModelTest() { + final Schema schema = new ObjectSchema().addProperties("value", + new ComposedSchema().addAnyOfItem(new StringSchema()).addAnyOfItem(new ArraySchema() + .items(new ComposedSchema() + .addOneOfItem(new StringSchema()) + .addOneOfItem(new IntegerSchema().format("int64"))))) + .description("an any of with array oneof model"); + final DefaultCodegen codegen = new TypeScriptAngularClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + String s = codegen.getSchemaType((Schema)schema.getProperties().get("value")); + + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "an any of with array oneof model"); + Assert.assertEquals(cm.vars.size(), 1); + Assert.assertEquals(s, "string | Array"); + } + + @Test(description = "import a typemapping") + public void importTypeMappingModelTest() { + final Schema schema = new ArraySchema() + .items(new Schema().$ref("Children")) + .description("a typemapping array model"); + final DefaultCodegen codegen = new TypeScriptAngularClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + codegen.typeMapping().put("Children", "Test"); + codegen.importMapping().put("Test", "@myTest/package"); + final CodegenModel cm = codegen.fromModel("sample", schema); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a typemapping array model"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.imports.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Test")).size(), 1); + } + @Test(description = "convert a map model") public void mapModelTest() { final Schema schema = new Schema() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index 4f428705a19..8e20b035a55 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -37,7 +37,7 @@ public class ModelUtilsTest { public void testGetAllUsedSchemas() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/unusedSchemas.yaml"); List allUsedSchemas = ModelUtils.getAllUsedSchemas(openAPI); - Assert.assertEquals(allUsedSchemas.size(), 38); + Assert.assertEquals(allUsedSchemas.size(), 41); Assert.assertTrue(allUsedSchemas.contains("SomeObjShared"), "contains 'SomeObjShared'"); Assert.assertTrue(allUsedSchemas.contains("SomeObj1"), "contains 'UnusedObj1'"); @@ -77,21 +77,30 @@ public class ModelUtilsTest { Assert.assertTrue(allUsedSchemas.contains("SomeObj26"), "contains 'SomeObj26'"); Assert.assertTrue(allUsedSchemas.contains("Param27"), "contains 'Param27'"); Assert.assertTrue(allUsedSchemas.contains("Param28"), "contains 'Param28'"); + Assert.assertTrue(allUsedSchemas.contains("Parent30"), "contains 'Parent30'"); + Assert.assertTrue(allUsedSchemas.contains("AChild30"), "contains 'AChild30'"); + Assert.assertTrue(allUsedSchemas.contains("BChild30"), "contains 'BChild30'"); } @Test public void testGetUnusedSchemas() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/unusedSchemas.yaml"); List unusedSchemas = ModelUtils.getUnusedSchemas(openAPI); - Assert.assertEquals(unusedSchemas.size(), 4); - //UnusedObj is not used at all: + Assert.assertEquals(unusedSchemas.size(), 7); + //UnusedObj1 is not used at all: Assert.assertTrue(unusedSchemas.contains("UnusedObj1"), "contains 'UnusedObj1'"); - //SomeObjUnused is used in a request body that is not used. + //UnusedObj2 is used in a request body that is not used. Assert.assertTrue(unusedSchemas.contains("UnusedObj2"), "contains 'UnusedObj2'"); - //SomeObjUnused is used in a response that is not used. + //UnusedObj3 is used in a response that is not used. Assert.assertTrue(unusedSchemas.contains("UnusedObj3"), "contains 'UnusedObj3'"); - //SomeObjUnused is used in a parameter that is not used. + //UnusedObj4 is used in a parameter that is not used. Assert.assertTrue(unusedSchemas.contains("UnusedObj4"), "contains 'UnusedObj4'"); + //Parent29 is not used at all (only unused children AChild29 and BChild29 are referencing him): + Assert.assertTrue(unusedSchemas.contains("Parent29"), "contains 'Parent29'"); + //AChild29 is not used at all: + Assert.assertTrue(unusedSchemas.contains("AChild29"), "contains 'AChild29'"); + //BChild29 is not used at all: + Assert.assertTrue(unusedSchemas.contains("BChild29"), "contains 'BChild29'"); } @Test diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index fea5233ee26..a443f059b7e 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -269,6 +269,13 @@ paths: description: file to upload required: false type: file + - name: files + in: formData + description: files to upload + required: false + type: array + items: + type: file responses: '200': description: successful operation diff --git a/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml b/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml new file mode 100644 index 00000000000..7977bee3bec --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml @@ -0,0 +1,35 @@ +openapi: 3.0.0 +servers: + - url: 'localhost:8080' +info: + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +paths: + /set_style: + get: + operationId: setStyle + parameters: + - in: query + name: setStyleQuery + style: form + schema: + type: object + properties: + setStyleQueryParam: + type: string + /set_should_explode: + get: + operationId: setShouldExplode + parameters: + - in: query + name: setShouldExplodeQuery + style: form + explode: true + schema: + type: object + properties: + setShouldExplodeQueryParam: + type: string diff --git a/modules/openapi-generator/src/test/resources/3_0/unusedSchemas.yaml b/modules/openapi-generator/src/test/resources/3_0/unusedSchemas.yaml index 57027f58027..b6da43e64a8 100644 --- a/modules/openapi-generator/src/test/resources/3_0/unusedSchemas.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/unusedSchemas.yaml @@ -352,6 +352,17 @@ paths: responses: '200': description: OK + /some/p30: + post: + operationId: op27 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Parent30" + responses: + '200': + description: OK components: schemas: UnusedObj1: @@ -641,6 +652,56 @@ components: type: string r2: type: string + Parent29: + type: object + required: + - childType + properties: + childType: + type: string + discriminator: + propertyName: childType + AChild29: + allOf: + - $ref: '#/components/schemas/Parent29' + - type: object + properties: + name: + type: string + BChild29: + allOf: + - $ref: '#/components/schemas/Parent29' + - type: object + properties: + firstName: + type: string + lastName: + type: string + Parent30: + type: object + required: + - childType + properties: + childType: + type: string + discriminator: + propertyName: childType + AChild30: + allOf: + - $ref: '#/components/schemas/Parent30' + - type: object + properties: + name: + type: string + BChild30: + allOf: + - $ref: '#/components/schemas/Parent30' + - type: object + properties: + firstName: + type: string + lastName: + type: string SomeObjShared: type: object properties: diff --git a/pom.xml b/pom.xml index 972ea9c4847..c4e35099e2c 100644 --- a/pom.xml +++ b/pom.xml @@ -266,6 +266,9 @@ + + 1.8.0 + 3.2.5 @@ -1036,8 +1039,9 @@ samples/server/petstore/python-aiohttp + samples/client/petstore/bash samples/client/petstore/c - + samples/client/petstore/cpp-qt5 samples/client/petstore/elm-0.18 samples/client/petstore/rust @@ -1072,7 +1076,6 @@ samples/client/petstore/typescript-angular-v4.3/npm samples/client/petstore/typescript-angular-v6-provided-in-root samples/client/petstore/typescript-angular-v7-provided-in-root - samples/server/petstore/rust-server samples/server/petstore/python-flask samples/server/petstore/python-flask-python2 @@ -1164,6 +1167,7 @@ samples/server/petstore/scala-lagom-server samples/server/petstore/scala-play-server samples/server/petstore/scalatra + samples/server/petstore/java-vertx-web/rx samples/server/petstore/scala-finch samples/server/petstore/kotlin/vertx samples/server/petstore/kotlin-springboot @@ -1179,6 +1183,8 @@ + samples/server/petstore/go-api-server + samples/server/petstore/go-gin-api-server samples/openapi3/client/petstore/ruby @@ -1311,18 +1317,6 @@ samples/client/petstore/objc/core-data/SwaggerClientTests--> - - samples.bash - - - env - samples.bash - - - - samples/client/petstore/bash - - modules/openapi-generator-core @@ -1396,9 +1390,9 @@ 1.8 1.8 - org.openapitools.swagger.parser - 2.0.9 - 2.0.14-OpenAPITools.org-1 + 2.0.10 + io.swagger.parser.v3 + 2.0.15 2.11.1 3.3.1 2.4 diff --git a/samples/client/petstore/R/DESCRIPTION b/samples/client/petstore/R/DESCRIPTION index a77a8bd6877..a1174eda1f2 100644 --- a/samples/client/petstore/R/DESCRIPTION +++ b/samples/client/petstore/R/DESCRIPTION @@ -5,7 +5,7 @@ Authors@R: person("OpenAPI Generator community", email = "team@openapitools.org" Description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. Depends: R (>= 3.3.3) Encoding: UTF-8 -License: Unlicense +License: Apache-2.0 LazyData: true Suggests: testthat Imports: jsonlite, httr, R6, caTools diff --git a/samples/client/petstore/R/docs/Category.md b/samples/client/petstore/R/docs/Category.md index 700ed1c4c08..93c2a721137 100644 --- a/samples/client/petstore/R/docs/Category.md +++ b/samples/client/petstore/R/docs/Category.md @@ -1,5 +1,6 @@ # petstore::Category +A category for a pet ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/R/docs/ModelApiResponse.md b/samples/client/petstore/R/docs/ModelApiResponse.md index d6ccac8474f..4b53ceb4137 100644 --- a/samples/client/petstore/R/docs/ModelApiResponse.md +++ b/samples/client/petstore/R/docs/ModelApiResponse.md @@ -1,5 +1,6 @@ # petstore::ModelApiResponse +Describes the result of uploading an image resource ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/R/docs/Order.md b/samples/client/petstore/R/docs/Order.md index a72ecf21ee8..76398d1ef10 100644 --- a/samples/client/petstore/R/docs/Order.md +++ b/samples/client/petstore/R/docs/Order.md @@ -1,5 +1,6 @@ # petstore::Order +An order for a pets from the pet store ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/R/docs/Pet.md b/samples/client/petstore/R/docs/Pet.md index f5a9c0dd611..92ed51c801f 100644 --- a/samples/client/petstore/R/docs/Pet.md +++ b/samples/client/petstore/R/docs/Pet.md @@ -1,5 +1,6 @@ # petstore::Pet +A pet for sale in the pet store ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/R/docs/Tag.md b/samples/client/petstore/R/docs/Tag.md index 1a5a1e82c95..595279123e1 100644 --- a/samples/client/petstore/R/docs/Tag.md +++ b/samples/client/petstore/R/docs/Tag.md @@ -1,5 +1,6 @@ # petstore::Tag +A tag for a pet ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/R/docs/User.md b/samples/client/petstore/R/docs/User.md index 072efdfc2ac..8d04bdd9d34 100644 --- a/samples/client/petstore/R/docs/User.md +++ b/samples/client/petstore/R/docs/User.md @@ -1,5 +1,6 @@ # petstore::User +A User who is purchasing from the pet store ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index 9e6a8c0dac3..ddef9718509 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -100,7 +100,7 @@ All URIs are relative to */v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**123Test@$%SpecialTags**](docs/AnotherFakeApi.md#123test@$%specialtags) | **PATCH** /another-fake/dummy | To test special tags +*AnotherFakeApi* | [**call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags *FakeApi* | [**createXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem *FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | @@ -117,6 +117,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index 22d7eaf982d..a4000b479d7 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -296,7 +296,7 @@ case $state in ops) # Operations _values "Operations" \ - "123Test@$%SpecialTags[To test special tags]" "createXmlItem[creates an XmlItem]" \ + "call123TestSpecialTags[To test special tags]" "createXmlItem[creates an XmlItem]" \ "fakeOuterBooleanSerialize[]" \ "fakeOuterCompositeSerialize[]" \ "fakeOuterNumberSerialize[]" \ @@ -311,7 +311,8 @@ case $state in "testEnumParameters[To test enum parameters]" \ "testGroupParameters[Fake endpoint to test group parameters (optional)]" \ "testInlineAdditionalProperties[test inline additionalProperties]" \ - "testJsonFormData[test json serialization of form data]" "testClassname[To test class name in snake case]" "addPet[Add a new pet to the store]" \ + "testJsonFormData[test json serialization of form data]" \ + "testQueryParameterCollectionFormat[]" "testClassname[To test class name in snake case]" "addPet[Add a new pet to the store]" \ "deletePet[Deletes a pet]" \ "findPetsByStatus[Finds Pets by status]" \ "findPetsByTags[Finds Pets by tags]" \ @@ -336,7 +337,7 @@ case $state in ;; args) case $line[1] in - 123Test@$%SpecialTags) + call123TestSpecialTags) local -a _op_arguments _op_arguments=( ) @@ -433,6 +434,17 @@ case $state in ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; + testQueryParameterCollectionFormat) + local -a _op_arguments + _op_arguments=( + "pipe=:[QUERY] " +"ioutil=:[QUERY] " +"http=:[QUERY] " +"url=:[QUERY] " +"context=:[QUERY] " + ) + _describe -t actions 'operations' _op_arguments -S '' && ret=0 + ;; testClassname) local -a _op_arguments _op_arguments=( diff --git a/samples/client/petstore/bash/docs/AnotherFakeApi.md b/samples/client/petstore/bash/docs/AnotherFakeApi.md index f93603717d2..e17a9e75d00 100644 --- a/samples/client/petstore/bash/docs/AnotherFakeApi.md +++ b/samples/client/petstore/bash/docs/AnotherFakeApi.md @@ -4,11 +4,11 @@ All URIs are relative to */v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**123Test@$%SpecialTags**](AnotherFakeApi.md#123Test@$%SpecialTags) | **PATCH** /another-fake/dummy | To test special tags +[**call123TestSpecialTags**](AnotherFakeApi.md#call123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -## 123Test@$%SpecialTags +## call123TestSpecialTags To test special tags @@ -17,7 +17,7 @@ To test special tags and operation ID starting with number ### Example ```bash -petstore-cli 123Test@$%SpecialTags +petstore-cli call123TestSpecialTags ``` ### Parameters diff --git a/samples/client/petstore/bash/docs/FakeApi.md b/samples/client/petstore/bash/docs/FakeApi.md index 0f9bf109d34..0b14173e0e6 100644 --- a/samples/client/petstore/bash/docs/FakeApi.md +++ b/samples/client/petstore/bash/docs/FakeApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters | @@ -504,3 +505,42 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## testQueryParameterCollectionFormat + + + +To test the collection format in query parameters + +### Example + +```bash +petstore-cli testQueryParameterCollectionFormat Specify as: pipe="value1,value2,..." Specify as: ioutil="value1,value2,..." Specify as: Specify as: url="value1,value2,..." Specify as: context=value1 context=value2 context=... +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**array[string]**](string.md) | | [default to null] + **ioutil** | [**array[string]**](string.md) | | [default to null] + **http** | [**array[string]**](string.md) | | [default to null] + **url** | [**array[string]**](string.md) | | [default to null] + **context** | [**array[string]**](string.md) | | [default to null] + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not Applicable +- **Accept**: Not Applicable + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/bash/docs/FormatTest.md b/samples/client/petstore/bash/docs/FormatTest.md index 8f73bb59bbc..385631d820c 100644 --- a/samples/client/petstore/bash/docs/FormatTest.md +++ b/samples/client/petstore/bash/docs/FormatTest.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **dateTime** | **string** | | [optional] [default to null] **uuid** | **string** | | [optional] [default to null] **password** | **string** | | [default to null] +**BigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/bash/docs/HasOnlyReadOnly.md b/samples/client/petstore/bash/docs/HasOnlyReadOnly.md index 136c1624714..e16db1dba02 100644 --- a/samples/client/petstore/bash/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/bash/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] [default to null] -**foo** | **string** | | [optional] [default to null] +**bar** | **string** | | [optional] [readonly] [default to null] +**foo** | **string** | | [optional] [readonly] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/bash/docs/Name.md b/samples/client/petstore/bash/docs/Name.md index 5c3afc21594..295812c7bb7 100644 --- a/samples/client/petstore/bash/docs/Name.md +++ b/samples/client/petstore/bash/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **integer** | | [default to null] -**snakeUnderscorecase** | **integer** | | [optional] [default to null] +**snakeUnderscorecase** | **integer** | | [optional] [readonly] [default to null] **property** | **string** | | [optional] [default to null] -**123Number** | **integer** | | [optional] [default to null] +**123Number** | **integer** | | [optional] [readonly] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/bash/docs/ReadOnlyFirst.md b/samples/client/petstore/bash/docs/ReadOnlyFirst.md index de713c7197b..9b3b961012a 100644 --- a/samples/client/petstore/bash/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/bash/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **string** | | [optional] [default to null] +**bar** | **string** | | [optional] [readonly] [default to null] **baz** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/bash/docs/TypeHolderExample.md b/samples/client/petstore/bash/docs/TypeHolderExample.md index 411eda40870..b88e8707ed3 100644 --- a/samples/client/petstore/bash/docs/TypeHolderExample.md +++ b/samples/client/petstore/bash/docs/TypeHolderExample.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **stringUnderscoreitem** | **string** | | [default to null] **numberUnderscoreitem** | **integer** | | [default to null] +**floatUnderscoreitem** | **float** | | [default to null] **integerUnderscoreitem** | **integer** | | [default to null] **boolUnderscoreitem** | **boolean** | | [default to null] **arrayUnderscoreitem** | **array[integer]** | | [default to null] diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index dabf7c50485..17891dc77b4 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -1,5 +1,4 @@ #!/usr/bin/env bash - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # ! # ! Note: @@ -10,7 +9,6 @@ # ! # ! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # # This is a Bash client for OpenAPI Petstore. # @@ -95,7 +93,7 @@ declare -a result_color_table=( "$WHITE" "$WHITE" "$GREEN" "$YELLOW" "$WHITE" "$ # 0 - optional # 1 - required declare -A operation_parameters_minimum_occurrences -operation_parameters_minimum_occurrences["123Test@$%SpecialTags:::body"]=1 +operation_parameters_minimum_occurrences["call123TestSpecialTags:::body"]=1 operation_parameters_minimum_occurrences["createXmlItem:::XmlItem"]=1 operation_parameters_minimum_occurrences["fakeOuterBooleanSerialize:::body"]=0 operation_parameters_minimum_occurrences["fakeOuterCompositeSerialize:::body"]=0 @@ -136,6 +134,11 @@ operation_parameters_minimum_occurrences["testGroupParameters:::int64_group"]=0 operation_parameters_minimum_occurrences["testInlineAdditionalProperties:::param"]=1 operation_parameters_minimum_occurrences["testJsonFormData:::param"]=1 operation_parameters_minimum_occurrences["testJsonFormData:::param2"]=1 +operation_parameters_minimum_occurrences["testQueryParameterCollectionFormat:::pipe"]=1 +operation_parameters_minimum_occurrences["testQueryParameterCollectionFormat:::ioutil"]=1 +operation_parameters_minimum_occurrences["testQueryParameterCollectionFormat:::http"]=1 +operation_parameters_minimum_occurrences["testQueryParameterCollectionFormat:::url"]=1 +operation_parameters_minimum_occurrences["testQueryParameterCollectionFormat:::context"]=1 operation_parameters_minimum_occurrences["testClassname:::body"]=1 operation_parameters_minimum_occurrences["addPet:::body"]=1 operation_parameters_minimum_occurrences["deletePet:::petId"]=1 @@ -173,7 +176,7 @@ operation_parameters_minimum_occurrences["updateUser:::body"]=1 # N - N values # 0 - unlimited declare -A operation_parameters_maximum_occurrences -operation_parameters_maximum_occurrences["123Test@$%SpecialTags:::body"]=0 +operation_parameters_maximum_occurrences["call123TestSpecialTags:::body"]=0 operation_parameters_maximum_occurrences["createXmlItem:::XmlItem"]=0 operation_parameters_maximum_occurrences["fakeOuterBooleanSerialize:::body"]=0 operation_parameters_maximum_occurrences["fakeOuterCompositeSerialize:::body"]=0 @@ -214,6 +217,11 @@ operation_parameters_maximum_occurrences["testGroupParameters:::int64_group"]=0 operation_parameters_maximum_occurrences["testInlineAdditionalProperties:::param"]=0 operation_parameters_maximum_occurrences["testJsonFormData:::param"]=0 operation_parameters_maximum_occurrences["testJsonFormData:::param2"]=0 +operation_parameters_maximum_occurrences["testQueryParameterCollectionFormat:::pipe"]=0 +operation_parameters_maximum_occurrences["testQueryParameterCollectionFormat:::ioutil"]=0 +operation_parameters_maximum_occurrences["testQueryParameterCollectionFormat:::http"]=0 +operation_parameters_maximum_occurrences["testQueryParameterCollectionFormat:::url"]=0 +operation_parameters_maximum_occurrences["testQueryParameterCollectionFormat:::context"]=0 operation_parameters_maximum_occurrences["testClassname:::body"]=0 operation_parameters_maximum_occurrences["addPet:::body"]=0 operation_parameters_maximum_occurrences["deletePet:::petId"]=0 @@ -248,7 +256,7 @@ operation_parameters_maximum_occurrences["updateUser:::body"]=0 # The type of collection for specifying multiple values for parameter: # - multi, csv, ssv, tsv declare -A operation_parameters_collection_type -operation_parameters_collection_type["123Test@$%SpecialTags:::body"]="" +operation_parameters_collection_type["call123TestSpecialTags:::body"]="" operation_parameters_collection_type["createXmlItem:::XmlItem"]="" operation_parameters_collection_type["fakeOuterBooleanSerialize:::body"]="" operation_parameters_collection_type["fakeOuterCompositeSerialize:::body"]="" @@ -289,6 +297,11 @@ operation_parameters_collection_type["testGroupParameters:::int64_group"]="" operation_parameters_collection_type["testInlineAdditionalProperties:::param"]= operation_parameters_collection_type["testJsonFormData:::param"]="" operation_parameters_collection_type["testJsonFormData:::param2"]="" +operation_parameters_collection_type["testQueryParameterCollectionFormat:::pipe"]="csv" +operation_parameters_collection_type["testQueryParameterCollectionFormat:::ioutil"]="csv" +operation_parameters_collection_type["testQueryParameterCollectionFormat:::http"]= +operation_parameters_collection_type["testQueryParameterCollectionFormat:::url"]="csv" +operation_parameters_collection_type["testQueryParameterCollectionFormat:::context"]="multi" operation_parameters_collection_type["testClassname:::body"]="" operation_parameters_collection_type["addPet:::body"]="" operation_parameters_collection_type["deletePet:::petId"]="" @@ -721,7 +734,7 @@ EOF echo "" echo -e "${BOLD}${WHITE}[anotherFake]${OFF}" read -r -d '' ops < #include -OAIPetApi* PetApiTests::getApi() { - auto api = new OAIPetApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - OAIPet PetApiTests::createRandomPet() { OAIPet pet; qint64 id = QDateTime::currentMSecsSinceEpoch(); @@ -19,11 +13,12 @@ OAIPet PetApiTests::createRandomPet() { } void PetApiTests::findPetsByStatusTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool petFound = false; - connect(api, &OAIPetApi::findPetsByStatusSignal, [&](QList pets) { + connect(&api, &OAIPetApi::findPetsByStatusSignal, [&](QList pets) { petFound = true; foreach(OAIPet pet, pets) { QVERIFY(pet.getStatus().startsWith("available") || pet.getStatus().startsWith("sold")); @@ -31,19 +26,19 @@ void PetApiTests::findPetsByStatusTest() { loop.quit(); }); - api->findPetsByStatus({"available", "sold"}); + api.findPetsByStatus({"available", "sold"}); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFound, "didn't finish within timeout"); - delete api; } void PetApiTests::createAndGetPetTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool petCreated = false; - connect(api, &OAIPetApi::addPetSignal, [&]() { + connect(&api, &OAIPetApi::addPetSignal, [&]() { // pet created petCreated = true; loop.quit(); @@ -52,30 +47,30 @@ void PetApiTests::createAndGetPetTest() { OAIPet pet = createRandomPet(); qint64 id = pet.getId(); - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petCreated, "didn't finish within timeout"); bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { QVERIFY(pet.getId() > 0); QVERIFY(pet.getStatus().compare("freaky") == 0); loop.quit(); petFetched = true; }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); - delete api; } void PetApiTests::updatePetTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); OAIPet pet = createRandomPet(); OAIPet petToCheck; @@ -83,13 +78,13 @@ void PetApiTests::updatePetTest() { QEventLoop loop; bool petAdded = false; - connect(api, &OAIPetApi::addPetSignal, [&](){ + connect(&api, &OAIPetApi::addPetSignal, [&](){ petAdded = true; loop.quit(); }); // create pet - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petAdded, "didn't finish within timeout"); @@ -97,50 +92,49 @@ void PetApiTests::updatePetTest() { // fetch it bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, this, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, this, [&](OAIPet pet) { petFetched = true; petToCheck = pet; loop.quit(); }); // create pet - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); // update it bool petUpdated = false; - connect(api, &OAIPetApi::updatePetSignal, [&]() { + connect(&api, &OAIPetApi::updatePetSignal, [&]() { petUpdated = true; loop.quit(); }); // update pet petToCheck.setStatus(QString("scary")); - api->updatePet(petToCheck); + api.updatePet(petToCheck); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated, "didn't finish within timeout"); // check it bool petFetched2 = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petFetched2 = true; QVERIFY(pet.getId() == petToCheck.getId()); QVERIFY(pet.getStatus().compare(petToCheck.getStatus()) == 0); loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched2, "didn't finish within timeout"); - - delete api; } void PetApiTests::updatePetWithFormTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); OAIPet pet = createRandomPet(); OAIPet petToCheck; @@ -149,54 +143,52 @@ void PetApiTests::updatePetWithFormTest() { // create pet bool petAdded = false; - connect(api, &OAIPetApi::addPetSignal, [&](){ + connect(&api, &OAIPetApi::addPetSignal, [&](){ petAdded = true; loop.quit(); }); - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petAdded, "didn't finish within timeout"); // fetch it bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petFetched = true; petToCheck = pet; loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); // update it bool petUpdated = false; - connect(api, &OAIPetApi::updatePetWithFormSignal, [&](){ + connect(&api, &OAIPetApi::updatePetWithFormSignal, [&](){ petUpdated = true; loop.quit(); }); QString name("gorilla"); - api->updatePetWithForm(id, name, nullptr); + api.updatePetWithForm(id, name, nullptr); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated, "didn't finish within timeout"); // fetch it bool petUpdated2 = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petUpdated2 = true; QVERIFY(pet.getName().compare(QString("gorilla")) == 0); loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated2, "didn't finish within timeout"); - - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h index 2abf6bb17db..3f1a68f4b14 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h @@ -7,7 +7,6 @@ using namespace OpenAPI; class PetApiTests: public QObject { Q_OBJECT - OAIPetApi* getApi(); OAIPet createRandomPet(); private slots: @@ -15,4 +14,6 @@ private slots: void createAndGetPetTest(); void updatePetTest(); void updatePetWithFormTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp index 1a2492d7904..9433d5be957 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp +++ b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp @@ -4,25 +4,20 @@ #include #include -OAIStoreApi* StoreApiTests::getApi() { - auto api = new OAIStoreApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - void StoreApiTests::placeOrderTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool orderPlaced = false; - connect(api, &OAIStoreApi::placeOrderSignal, [&](OAIOrder order) { + connect(&api, &OAIStoreApi::placeOrderSignal, [&](OAIOrder order) { orderPlaced = true; QVERIFY(order.getPetId() == 10000); QVERIFY((order.getId() == 500)); qDebug() << order.getShipDate(); loop.quit(); }); - connect(api, &OAIStoreApi::placeOrderSignalE, [&](){ + connect(&api, &OAIStoreApi::placeOrderSignalE, [&](){ QFAIL("shouldn't trigger error"); loop.quit(); }); @@ -34,20 +29,20 @@ void StoreApiTests::placeOrderTest() { order.setComplete(false); order.setStatus("shipping"); order.setShipDate(QDateTime::currentDateTime()); - api->placeOrder(order); + api.placeOrder(order); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(orderPlaced, "didn't finish within timeout"); - delete api; } void StoreApiTests::getOrderByIdTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool orderFetched = false; - connect(api, &OAIStoreApi::getOrderByIdSignal, [&](OAIOrder order) { + connect(&api, &OAIStoreApi::getOrderByIdSignal, [&](OAIOrder order) { orderFetched = true; QVERIFY(order.getPetId() == 10000); QVERIFY((order.getId() == 500)); @@ -55,20 +50,20 @@ void StoreApiTests::getOrderByIdTest() { loop.quit(); }); - api->getOrderById(500); + api.getOrderById(500); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(orderFetched, "didn't finish within timeout"); - delete api; } void StoreApiTests::getInventoryTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool inventoryFetched = false; - connect(api, &OAIStoreApi::getInventorySignal, [&](QMap status) { + connect(&api, &OAIStoreApi::getInventorySignal, [&](QMap status) { inventoryFetched = true; for(const auto& key : status.keys()) { qDebug() << (key) << " Quantities " << status.value(key); @@ -76,10 +71,9 @@ void StoreApiTests::getInventoryTest() { loop.quit(); }); - api->getInventory(); + api.getInventory(); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(inventoryFetched, "didn't finish within timeout"); - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h index e4aafaeb1d7..40023ae6b87 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h @@ -7,10 +7,10 @@ using namespace OpenAPI; class StoreApiTests: public QObject { Q_OBJECT - OAIStoreApi* getApi(); - private slots: void placeOrderTest(); void getOrderByIdTest(); void getInventoryTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp index 0712822f831..68a28f40156 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp +++ b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp @@ -4,12 +4,6 @@ #include #include -OAIUserApi* UserApiTests::getApi() { - auto api = new OAIUserApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - OAIUser UserApiTests::createRandomUser() { OAIUser user; user.setId(QDateTime::currentMSecsSinceEpoch()); @@ -24,29 +18,29 @@ OAIUser UserApiTests::createRandomUser() { } void UserApiTests::createUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userCreated = false; - connect(api, &OAIUserApi::createUserSignal, [&](){ + connect(&api, &OAIUserApi::createUserSignal, [&](){ userCreated = true; loop.quit(); }); - api->createUser(createRandomUser()); + api.createUser(createRandomUser()); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::createUsersWithArrayInputTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool usersCreated = false; - connect(api, &OAIUserApi::createUsersWithArrayInputSignal, [&](){ + connect(&api, &OAIUserApi::createUsersWithArrayInputSignal, [&](){ usersCreated = true; loop.quit(); }); @@ -55,20 +49,19 @@ void UserApiTests::createUsersWithArrayInputTest(){ users.append(createRandomUser()); users.append(createRandomUser()); users.append(createRandomUser()); - api->createUsersWithArrayInput(users); + api.createUsersWithArrayInput(users); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(usersCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::createUsersWithListInputTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool usersCreated = false; - connect(api, &OAIUserApi::createUsersWithListInputSignal, [&](){ + connect(&api, &OAIUserApi::createUsersWithListInputSignal, [&](){ usersCreated = true; loop.quit(); }); @@ -81,105 +74,98 @@ void UserApiTests::createUsersWithListInputTest(){ users.append(johndoe); users.append(rambo); users.append(createRandomUser()); - api->createUsersWithListInput(users); + api.createUsersWithListInput(users); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(usersCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::deleteUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userDeleted = false; - connect(api, &OAIUserApi::deleteUserSignal, [&](){ + connect(&api, &OAIUserApi::deleteUserSignal, [&](){ userDeleted = true; loop.quit(); }); - api->deleteUser("rambo"); + api.deleteUser("rambo"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userDeleted, "didn't finish within timeout"); - - delete api; } void UserApiTests::getUserByNameTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userFetched = false; - connect(api, &OAIUserApi::getUserByNameSignal, [&](OAIUser summary) { + connect(&api, &OAIUserApi::getUserByNameSignal, [&](OAIUser summary) { userFetched = true; qDebug() << summary.getUsername(); QVERIFY(summary.getUsername() == "johndoe"); loop.quit(); }); - api->getUserByName("johndoe"); + api.getUserByName("johndoe"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userFetched, "didn't finish within timeout"); - - delete api; } void UserApiTests::loginUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userLogged = false; - connect(api, &OAIUserApi::loginUserSignal, [&](QString summary) { + connect(&api, &OAIUserApi::loginUserSignal, [&](QString summary) { userLogged = true; qDebug() << summary; loop.quit(); }); - api->loginUser("johndoe", "123456789"); + api.loginUser("johndoe", "123456789"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userLogged, "didn't finish within timeout"); - - delete api; } void UserApiTests::logoutUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userLoggedOut = false; - connect(api, &OAIUserApi::logoutUserSignal, [&](){ + connect(&api, &OAIUserApi::logoutUserSignal, [&](){ userLoggedOut = true; loop.quit(); }); - api->logoutUser(); + api.logoutUser(); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userLoggedOut, "didn't finish within timeout"); - - delete api; } void UserApiTests::updateUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userUpdated = false; - connect(api, &OAIUserApi::updateUserSignal, [&]() { + connect(&api, &OAIUserApi::updateUserSignal, [&]() { userUpdated = true; loop.quit(); }); auto johndoe = createRandomUser(); johndoe.setUsername("johndoe"); - api->updateUser("johndoe", johndoe); + api.updateUser("johndoe", johndoe); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userUpdated, "didn't finish within timeout"); - - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h index a748b4df905..04dfcabd853 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h @@ -7,7 +7,6 @@ using namespace OpenAPI; class UserApiTests: public QObject { Q_OBJECT - OAIUserApi* getApi(); OAIUser createRandomUser(); private slots: @@ -19,4 +18,6 @@ private slots: void loginUserTest(); void logoutUserTest(); void updateUserTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/build-and-test.bash b/samples/client/petstore/cpp-qt5/build-and-test.bash index ea8cbeb1357..bcf96489533 100755 --- a/samples/client/petstore/cpp-qt5/build-and-test.bash +++ b/samples/client/petstore/cpp-qt5/build-and-test.bash @@ -1,42 +1,48 @@ #!/bin/bash set -e +# export RUN_VALGRIND_TESTS=TRUE mkdir -p build cd build -qmake ../PetStore/PetStore.pro CONFIG+=debug +cmake .. make -valgrind --leak-check=full ./PetStore |& tee result.log || exit 1 - -echo "Make sure the tests are launched:" -testCount=$(cat result.log | grep 'Finished testing of' | wc -l) -if [ $testCount == 3 ] -then - echo "Ok" +if [[ -z "${RUN_VALGRIND_TESTS}" ]]; then + echo "Running Qt5 Petstore Tests" + ./cpp-qt5-petstore else - echo "The tests were not run!!!" - exit 1 + echo "Running Qt5 Petstore Tests with Valgrind" + valgrind --leak-check=full ./cpp-qt5-petstore |& tee result.log || exit 1 + testCount=$(cat result.log | grep 'Finished testing of' | wc -l) + if [ $testCount == 3 ] + then + echo "Ok" + else + echo "The tests were not run!!!" + exit 1 + fi + + echo "Make sure the tests passed:" + successCount=$(cat result.log | grep '0 failed' | wc -l) + if [ $successCount == 3 ] + then + echo "Ok" + else + echo "The tests failed!!!" + exit 1 + fi + + echo "Check if no memory leaks occured:" + leakCount=$(cat result.log | grep 'lost: 0 bytes in 0 blocks' | wc -l) + if [ $leakCount == 3 ] + then + echo "Ok" + else + echo "There was memory leaks!!!" + exit 1 + fi fi -echo "Make sure the tests passed:" -successCount=$(cat result.log | grep '0 failed' | wc -l) -if [ $successCount == 3 ] -then - echo "Ok" -else - echo "The tests failed!!!" - exit 1 -fi - -echo "Check if no memory leaks occured:" -leakCount=$(cat result.log | grep 'lost: 0 bytes in 0 blocks' | wc -l) -if [ $leakCount == 3 ] -then - echo "Ok" -else - echo "There was memory leaks!!!" - exit 1 -fi diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ClassModel.md index 556b05db241..51e52f4b735 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ClassModel.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ClassModel.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/File.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/File.md index acf85a4c001..11192666c4f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/File.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/File.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.File +Must be named `File` for test. ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Model200Response.md index d155a4debd1..668f456c690 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Model200Response.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Model200Response.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md index ee5704947a2..c75e5d034e5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Name.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Return.md index d7266acb7d7..56a0ac3de08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Return.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/Return.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Return +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 87ac6e219c2..e7895f13c62 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -222,37 +222,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/another-fake/dummy", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/another-fake/dummy", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("Call123TestSpecialTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -281,37 +280,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("Call123TestSpecialTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index da7a53072e4..fba1d11ee15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool? body = null); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -68,7 +68,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null); + OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); /// /// @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -99,7 +99,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal? body = null); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = null); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - string FakeOuterStringSerialize (string body = null); + string FakeOuterStringSerialize (string body = default(string)); /// /// @@ -131,7 +131,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = null); + ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); /// /// /// @@ -219,7 +219,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -243,7 +243,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -260,7 +260,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -278,7 +278,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -293,7 +293,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -309,7 +309,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -422,7 +422,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -433,7 +433,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -443,7 +443,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)); /// /// @@ -454,7 +454,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -464,7 +464,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -475,7 +475,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -485,7 +485,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)); /// /// @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null); + System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)); /// /// /// @@ -584,7 +584,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -608,7 +608,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -625,7 +625,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -643,7 +643,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -658,7 +658,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -674,7 +674,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -891,9 +891,9 @@ namespace Org.OpenAPITools.Api if (xmlItem == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", @@ -903,29 +903,28 @@ namespace Org.OpenAPITools.Api }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = xmlItem; + localVarRequestOptions.Data = xmlItem; // make the HTTP request - - var response = this.Client.Post("/fake/create_xml_item", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake/create_xml_item", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateXmlItem", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateXmlItem", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -953,9 +952,9 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", @@ -965,29 +964,29 @@ namespace Org.OpenAPITools.Api }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = xmlItem; + localVarRequestOptions.Data = xmlItem; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/create_xml_item", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/create_xml_item", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateXmlItem", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateXmlItem", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -996,7 +995,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool? body = null) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1008,38 +1007,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) + public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< bool >("/fake/outer/boolean", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< bool >("/fake/outer/boolean", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterBooleanSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1048,7 +1046,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1061,39 +1059,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterBooleanSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1102,7 +1100,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1114,38 +1112,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) + public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< OuterComposite >("/fake/outer/composite", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< OuterComposite >("/fake/outer/composite", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterCompositeSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1154,7 +1151,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1167,39 +1164,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/composite", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterCompositeSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1208,7 +1205,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = null) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1220,38 +1217,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null) + public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< decimal >("/fake/outer/number", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< decimal >("/fake/outer/number", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterNumberSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1260,7 +1256,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1273,39 +1269,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/number", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterNumberSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1314,7 +1310,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - public string FakeOuterStringSerialize (string body = null) + public string FakeOuterStringSerialize (string body = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1326,38 +1322,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null) + public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< string >("/fake/outer/string", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< string >("/fake/outer/string", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterStringSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1366,7 +1361,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1379,39 +1374,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/string", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterStringSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1437,36 +1432,35 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/fake/body-with-file-schema", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithFileSchema", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1494,36 +1488,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithFileSchema", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1555,46 +1549,45 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (query != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/fake/body-with-query-params", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithQueryParams", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1628,46 +1621,46 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (query != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithQueryParams", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1694,37 +1687,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClientModel", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1753,37 +1745,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClientModel", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1805,7 +1797,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1829,7 +1821,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -1847,97 +1839,96 @@ namespace Org.OpenAPITools.Api if (_byte == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (integer != null) { - requestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter } if (int32 != null) { - requestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter } if (int64 != null) { - requestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } if (number != null) { - requestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter } if (_float != null) { - requestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } if (_double != null) { - requestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter } if (_string != null) { - requestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter } if (patternWithoutDelimiter != null) { - requestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter } if (_byte != null) { - requestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter } if (binary != null) { - requestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary); } if (date != null) { - requestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter } if (dateTime != null) { - requestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter } if (password != null) { - requestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter } if (callback != null) { - requestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } // authentication (http_basic_test) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request - - var response = this.Client.Post("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEndpointParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1959,7 +1950,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -1984,7 +1975,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2003,97 +1994,97 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (integer != null) { - requestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter } if (int32 != null) { - requestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter } if (int64 != null) { - requestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } if (number != null) { - requestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter } if (_float != null) { - requestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } if (_double != null) { - requestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter } if (_string != null) { - requestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter } if (patternWithoutDelimiter != null) { - requestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter } if (_byte != null) { - requestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter } if (binary != null) { - requestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary); } if (date != null) { - requestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter } if (dateTime != null) { - requestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter } if (password != null) { - requestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter } if (callback != null) { - requestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } // authentication (http_basic_test) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEndpointParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2109,7 +2100,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2127,89 +2118,88 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (enumQueryStringArray != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryString != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryInteger != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryDouble != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumHeaderStringArray != null) - requestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) - requestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) { - requestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter } if (enumFormString != null) { - requestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } // make the HTTP request - - var response = this.Client.Get("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEnumParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2225,7 +2215,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2244,90 +2234,90 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (enumQueryStringArray != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryString != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryInteger != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryDouble != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumHeaderStringArray != null) - requestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) - requestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) { - requestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter } if (enumFormString != null) { - requestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEnumParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2341,7 +2331,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2357,7 +2347,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2371,78 +2361,77 @@ namespace Org.OpenAPITools.Api if (requiredInt64Group == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (requiredStringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredInt64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (stringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (int64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredBooleanGroup != null) - requestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) - requestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter // make the HTTP request - - var response = this.Client.Delete("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestGroupParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2456,7 +2445,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2473,7 +2462,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2488,78 +2477,78 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (requiredStringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredInt64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (stringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (int64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredBooleanGroup != null) - requestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) - requestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestGroupParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2585,36 +2574,35 @@ namespace Org.OpenAPITools.Api if (param == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = param; + localVarRequestOptions.Data = param; // make the HTTP request - - var response = this.Client.Post("/fake/inline-additionalProperties", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestInlineAdditionalProperties", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2642,36 +2630,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = param; + localVarRequestOptions.Data = param; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestInlineAdditionalProperties", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2703,43 +2691,42 @@ namespace Org.OpenAPITools.Api if (param2 == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (param != null) { - requestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter } if (param2 != null) { - requestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter } // make the HTTP request - - var response = this.Client.Get("/fake/jsonFormData", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestJsonFormData", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2773,43 +2760,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (param != null) { - requestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter } if (param2 != null) { - requestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestJsonFormData", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2859,84 +2846,83 @@ namespace Org.OpenAPITools.Api if (context == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (pipe != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (ioutil != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (http != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (url != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (context != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Put("/fake/test-query-paramters", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/test-query-paramters", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2988,68 +2974,68 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (pipe != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (ioutil != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (http != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (url != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (context != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -3057,15 +3043,15 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 43b9d606262..ebf022334c8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -222,48 +222,47 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/fake_classname_test", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/fake_classname_test", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClassname", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -292,48 +291,48 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/fake_classname_test", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClassname", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 9ce10cba8b5..5cc53451ed7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - void DeletePet (long petId, string apiKey = null); + void DeletePet (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -70,7 +70,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null); + ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm (long petId, string name = null, string status = null); + void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -179,7 +179,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null); + ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -191,7 +191,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -229,7 +229,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Synchronous Operations } @@ -270,7 +270,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null); + System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null); + System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null); + System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -391,7 +391,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null); + System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -428,7 +428,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -441,7 +441,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Asynchronous Operations } @@ -585,43 +585,42 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post("/pet", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("AddPet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("AddPet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -649,43 +648,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("AddPet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("AddPet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -695,7 +694,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - public void DeletePet (long petId, string apiKey = null) + public void DeletePet (long petId, string apiKey = default(string)) { DeletePetWithHttpInfo(petId, apiKey); } @@ -707,50 +706,49 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) - requestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Delete("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeletePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeletePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -760,7 +758,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null) + public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)) { await DeletePetAsyncWithHttpInfo(petId, apiKey); @@ -773,51 +771,51 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null) + public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) - requestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeletePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeletePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -844,30 +842,30 @@ namespace Org.OpenAPITools.Api if (status == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (status != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -876,20 +874,19 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Get< List >("/pet/findByStatus", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< List >("/pet/findByStatus", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByStatus", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByStatus", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -918,30 +915,30 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (status != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -950,20 +947,20 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByStatus", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByStatus", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -990,30 +987,30 @@ namespace Org.OpenAPITools.Api if (tags == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (tags != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1022,20 +1019,19 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Get< List >("/pet/findByTags", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< List >("/pet/findByTags", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1064,30 +1060,30 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (tags != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1096,20 +1092,20 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/pet/findByTags", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1136,43 +1132,42 @@ namespace Org.OpenAPITools.Api if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - - var response = this.Client.Get< Pet >("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Pet >("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetPetById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetPetById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1201,43 +1196,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetPetById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetPetById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1263,43 +1258,42 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Put("/pet", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1327,43 +1321,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/pet", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1374,7 +1368,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm (long petId, string name = null, string status = null) + public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1387,57 +1381,56 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { - requestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter } if (status != null) { - requestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePetWithForm", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePetWithForm", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1448,7 +1441,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)) { await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status); @@ -1462,58 +1455,58 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { - requestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter } if (status != null) { - requestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePetWithForm", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePetWithForm", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1524,7 +1517,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1538,58 +1531,57 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (file != null) { - requestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post< ApiResponse >("/pet/{petId}/uploadImage", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< ApiResponse >("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1600,7 +1592,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1615,59 +1607,59 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (file != null) { - requestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1678,7 +1670,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1692,7 +1684,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1702,52 +1694,51 @@ namespace Org.OpenAPITools.Api if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (requiredFile != null) { - requestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post< ApiResponse >("/fake/{petId}/uploadImageWithRequiredFile", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< ApiResponse >("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFileWithRequiredFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1758,7 +1749,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1773,7 +1764,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1784,52 +1775,52 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (requiredFile != null) { - requestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFileWithRequiredFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index c50fa8ad1f8..72d56c685af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -343,36 +343,35 @@ namespace Org.OpenAPITools.Api if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - - var response = this.Client.Delete("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -400,36 +399,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -450,40 +449,39 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Dictionary<string, int> public Org.OpenAPITools.Client.ApiResponse< Dictionary > GetInventoryWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - - var response = this.Client.Get< Dictionary >("/store/inventory", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Dictionary >("/store/inventory", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetInventory", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -506,40 +504,40 @@ namespace Org.OpenAPITools.Api public async System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/store/inventory", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetInventory", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -566,38 +564,37 @@ namespace Org.OpenAPITools.Api if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - - var response = this.Client.Get< Order >("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Order >("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetOrderById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -626,38 +623,38 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetOrderById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -684,37 +681,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< Order >("/store/order", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< Order >("/store/order", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("PlaceOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("PlaceOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -743,37 +739,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/store/order", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("PlaceOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("PlaceOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs index 0bc4e77768a..3f1585ce46e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs @@ -519,35 +519,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -575,35 +574,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -629,35 +628,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user/createWithArray", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithArrayInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -685,35 +683,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user/createWithArray", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithArrayInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -739,35 +737,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user/createWithList", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithListInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithListInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -795,35 +792,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user/createWithList", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithListInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithListInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -849,36 +846,35 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - - var response = this.Client.Delete("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -906,36 +902,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -962,38 +958,37 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - - var response = this.Client.Get< User >("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< User >("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetUserByName", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1022,38 +1017,38 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetUserByName", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1086,56 +1081,55 @@ namespace Org.OpenAPITools.Api if (password == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (password != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Get< string >("/user/login", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< string >("/user/login", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LoginUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LoginUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1170,40 +1164,40 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (password != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1211,15 +1205,15 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/login", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LoginUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LoginUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1239,34 +1233,33 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); // make the HTTP request - - var response = this.Client.Get("/user/logout", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LogoutUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LogoutUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1288,34 +1281,34 @@ namespace Org.OpenAPITools.Api public async System.Threading.Tasks.Task> LogoutUserAsyncWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/logout", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LogoutUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LogoutUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1347,37 +1340,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - requestOptions.Data = body; + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1411,37 +1403,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - requestOptions.Data = body; + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ClassModel.md index 556b05db241..51e52f4b735 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ClassModel.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ClassModel.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/File.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/File.md index acf85a4c001..11192666c4f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/File.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/File.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.File +Must be named `File` for test. ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Model200Response.md index d155a4debd1..668f456c690 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Model200Response.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Model200Response.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md index ee5704947a2..c75e5d034e5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Name.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Return.md index d7266acb7d7..56a0ac3de08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Return.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/Return.md @@ -1,4 +1,5 @@ # Org.OpenAPITools.Model.Return +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 87ac6e219c2..e7895f13c62 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -222,37 +222,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/another-fake/dummy", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/another-fake/dummy", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("Call123TestSpecialTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -281,37 +280,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("Call123TestSpecialTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index da7a53072e4..fba1d11ee15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool? body = null); + bool FakeOuterBooleanSerialize (bool? body = default(bool?)); /// /// @@ -68,7 +68,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null); + OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); /// /// @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -99,7 +99,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal? body = null); + decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); /// /// @@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = null); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - string FakeOuterStringSerialize (string body = null); + string FakeOuterStringSerialize (string body = default(string)); /// /// @@ -131,7 +131,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = null); + ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); /// /// /// @@ -219,7 +219,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -243,7 +243,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -260,7 +260,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -278,7 +278,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -293,7 +293,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -309,7 +309,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -422,7 +422,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)); /// /// @@ -433,7 +433,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)); /// /// /// @@ -443,7 +443,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)); /// /// @@ -454,7 +454,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -464,7 +464,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)); /// /// @@ -475,7 +475,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)); /// /// /// @@ -485,7 +485,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)); /// /// @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null); + System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)); /// /// /// @@ -584,7 +584,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -608,7 +608,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -625,7 +625,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -643,7 +643,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -658,7 +658,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// Fake endpoint to test group parameters (optional) @@ -674,7 +674,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); /// /// test inline additionalProperties /// @@ -891,9 +891,9 @@ namespace Org.OpenAPITools.Api if (xmlItem == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", @@ -903,29 +903,28 @@ namespace Org.OpenAPITools.Api }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = xmlItem; + localVarRequestOptions.Data = xmlItem; // make the HTTP request - - var response = this.Client.Post("/fake/create_xml_item", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake/create_xml_item", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateXmlItem", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateXmlItem", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -953,9 +952,9 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", @@ -965,29 +964,29 @@ namespace Org.OpenAPITools.Api }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = xmlItem; + localVarRequestOptions.Data = xmlItem; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/create_xml_item", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/create_xml_item", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateXmlItem", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateXmlItem", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -996,7 +995,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool? body = null) + public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1008,38 +1007,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) + public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< bool >("/fake/outer/boolean", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< bool >("/fake/outer/boolean", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterBooleanSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1048,7 +1046,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1061,39 +1059,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = default(bool?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterBooleanSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1102,7 +1100,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1114,38 +1112,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) + public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< OuterComposite >("/fake/outer/composite", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< OuterComposite >("/fake/outer/composite", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterCompositeSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1154,7 +1151,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1167,39 +1164,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/composite", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterCompositeSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1208,7 +1205,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = null) + public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1220,38 +1217,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null) + public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< decimal >("/fake/outer/number", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< decimal >("/fake/outer/number", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterNumberSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1260,7 +1256,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1273,39 +1269,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = default(decimal?)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/number", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterNumberSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1314,7 +1310,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - public string FakeOuterStringSerialize (string body = null) + public string FakeOuterStringSerialize (string body = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1326,38 +1322,37 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null) + public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< string >("/fake/outer/string", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< string >("/fake/outer/string", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterStringSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1366,7 +1361,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1379,39 +1374,39 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "*/*" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/string", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FakeOuterStringSerialize", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1437,36 +1432,35 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/fake/body-with-file-schema", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithFileSchema", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1494,36 +1488,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithFileSchema", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1555,46 +1549,45 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (query != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/fake/body-with-query-params", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithQueryParams", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1628,46 +1621,46 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (query != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestBodyWithQueryParams", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1694,37 +1687,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClientModel", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1753,37 +1745,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClientModel", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1805,7 +1797,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1829,7 +1821,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -1847,97 +1839,96 @@ namespace Org.OpenAPITools.Api if (_byte == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (integer != null) { - requestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter } if (int32 != null) { - requestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter } if (int64 != null) { - requestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } if (number != null) { - requestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter } if (_float != null) { - requestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } if (_double != null) { - requestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter } if (_string != null) { - requestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter } if (patternWithoutDelimiter != null) { - requestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter } if (_byte != null) { - requestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter } if (binary != null) { - requestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary); } if (date != null) { - requestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter } if (dateTime != null) { - requestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter } if (password != null) { - requestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter } if (callback != null) { - requestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } // authentication (http_basic_test) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request - - var response = this.Client.Post("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEndpointParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1959,7 +1950,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -1984,7 +1975,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2003,97 +1994,97 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (integer != null) { - requestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter } if (int32 != null) { - requestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter } if (int64 != null) { - requestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } if (number != null) { - requestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter } if (_float != null) { - requestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } if (_double != null) { - requestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter } if (_string != null) { - requestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter } if (patternWithoutDelimiter != null) { - requestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter } if (_byte != null) { - requestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter } if (binary != null) { - requestOptions.FileParameters.Add("binary", binary); + localVarRequestOptions.FileParameters.Add("binary", binary); } if (date != null) { - requestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter } if (dateTime != null) { - requestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter } if (password != null) { - requestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter } if (callback != null) { - requestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter } // authentication (http_basic_test) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { - requestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEndpointParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2109,7 +2100,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2127,89 +2118,88 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (enumQueryStringArray != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryString != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryInteger != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryDouble != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumHeaderStringArray != null) - requestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) - requestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) { - requestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter } if (enumFormString != null) { - requestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } // make the HTTP request - - var response = this.Client.Get("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEnumParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2225,7 +2215,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2244,90 +2234,90 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (enumQueryStringArray != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryString != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryInteger != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumQueryDouble != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (enumHeaderStringArray != null) - requestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter if (enumHeaderString != null) - requestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter if (enumFormStringArray != null) { - requestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter } if (enumFormString != null) { - requestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestEnumParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2341,7 +2331,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2357,7 +2347,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2371,78 +2361,77 @@ namespace Org.OpenAPITools.Api if (requiredInt64Group == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (requiredStringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredInt64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (stringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (int64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredBooleanGroup != null) - requestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) - requestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter // make the HTTP request - - var response = this.Client.Delete("/fake", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestGroupParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2456,7 +2445,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2473,7 +2462,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2488,78 +2477,78 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (requiredStringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredInt64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (stringGroup != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (int64Group != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (requiredBooleanGroup != null) - requestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) - requestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/fake", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestGroupParameters", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2585,36 +2574,35 @@ namespace Org.OpenAPITools.Api if (param == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = param; + localVarRequestOptions.Data = param; // make the HTTP request - - var response = this.Client.Post("/fake/inline-additionalProperties", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestInlineAdditionalProperties", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2642,36 +2630,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = param; + localVarRequestOptions.Data = param; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestInlineAdditionalProperties", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2703,43 +2691,42 @@ namespace Org.OpenAPITools.Api if (param2 == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (param != null) { - requestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter } if (param2 != null) { - requestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter } // make the HTTP request - - var response = this.Client.Get("/fake/jsonFormData", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestJsonFormData", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2773,43 +2760,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (param != null) { - requestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter } if (param2 != null) { - requestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestJsonFormData", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2859,84 +2846,83 @@ namespace Org.OpenAPITools.Api if (context == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (pipe != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (ioutil != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (http != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (url != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (context != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Put("/fake/test-query-paramters", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/fake/test-query-paramters", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -2988,68 +2974,68 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (pipe != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (ioutil != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (http != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (url != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (context != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -3057,15 +3043,15 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 43b9d606262..ebf022334c8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -222,48 +222,47 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Patch< ModelClient >("/fake_classname_test", requestOptions, this.Configuration); + var localVarResponse = this.Client.Patch< ModelClient >("/fake_classname_test", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClassname", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -292,48 +291,48 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - var response = await this.AsynchronousClient.PatchAsync("/fake_classname_test", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("TestClassname", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs index 9ce10cba8b5..5cc53451ed7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - void DeletePet (long petId, string apiKey = null); + void DeletePet (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -70,7 +70,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null); + ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm (long petId, string name = null, string status = null); + void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -179,7 +179,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null); + ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -191,7 +191,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -229,7 +229,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Synchronous Operations } @@ -270,7 +270,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null); + System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null); + System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null); + System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -391,7 +391,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null); + System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -428,7 +428,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -441,7 +441,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Asynchronous Operations } @@ -585,43 +585,42 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post("/pet", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("AddPet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("AddPet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -649,43 +648,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("AddPet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("AddPet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -695,7 +694,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - public void DeletePet (long petId, string apiKey = null) + public void DeletePet (long petId, string apiKey = default(string)) { DeletePetWithHttpInfo(petId, apiKey); } @@ -707,50 +706,49 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) - requestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Delete("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeletePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeletePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -760,7 +758,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null) + public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)) { await DeletePetAsyncWithHttpInfo(petId, apiKey); @@ -773,51 +771,51 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null) + public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) - requestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter + localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeletePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeletePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -844,30 +842,30 @@ namespace Org.OpenAPITools.Api if (status == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (status != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -876,20 +874,19 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Get< List >("/pet/findByStatus", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< List >("/pet/findByStatus", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByStatus", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByStatus", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -918,30 +915,30 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (status != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -950,20 +947,20 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByStatus", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByStatus", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -990,30 +987,30 @@ namespace Org.OpenAPITools.Api if (tags == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (tags != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1022,20 +1019,19 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Get< List >("/pet/findByTags", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< List >("/pet/findByTags", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1064,30 +1060,30 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (tags != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1096,20 +1092,20 @@ namespace Org.OpenAPITools.Api // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/pet/findByTags", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("FindPetsByTags", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("FindPetsByTags", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1136,43 +1132,42 @@ namespace Org.OpenAPITools.Api if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - - var response = this.Client.Get< Pet >("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Pet >("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetPetById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetPetById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1201,43 +1196,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetPetById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetPetById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1263,43 +1258,42 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Put("/pet", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1327,43 +1321,43 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/json", "application/xml" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/pet", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePet", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePet", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1374,7 +1368,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm (long petId, string name = null, string status = null) + public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1387,57 +1381,56 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { - requestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter } if (status != null) { - requestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePetWithForm", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePetWithForm", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1448,7 +1441,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)) { await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status); @@ -1462,58 +1455,58 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "application/x-www-form-urlencoded" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { - requestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter + localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter } if (status != null) { - requestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter + localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet/{petId}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdatePetWithForm", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdatePetWithForm", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1524,7 +1517,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1538,58 +1531,57 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (file != null) { - requestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post< ApiResponse >("/pet/{petId}/uploadImage", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< ApiResponse >("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1600,7 +1592,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1615,59 +1607,59 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (file != null) { - requestOptions.FileParameters.Add("file", file); + localVarRequestOptions.FileParameters.Add("file", file); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1678,7 +1670,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1692,7 +1684,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1702,52 +1694,51 @@ namespace Org.OpenAPITools.Api if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (requiredFile != null) { - requestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - - var response = this.Client.Post< ApiResponse >("/fake/{petId}/uploadImageWithRequiredFile", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< ApiResponse >("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFileWithRequiredFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1758,7 +1749,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1773,7 +1764,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1784,52 +1775,52 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { "multipart/form-data" }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (petId != null) - requestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { - requestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter } if (requiredFile != null) { - requestOptions.FileParameters.Add("requiredFile", requiredFile); + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UploadFileWithRequiredFile", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs index c50fa8ad1f8..72d56c685af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -343,36 +343,35 @@ namespace Org.OpenAPITools.Api if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - - var response = this.Client.Delete("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -400,36 +399,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -450,40 +449,39 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Dictionary<string, int> public Org.OpenAPITools.Client.ApiResponse< Dictionary > GetInventoryWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - - var response = this.Client.Get< Dictionary >("/store/inventory", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Dictionary >("/store/inventory", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetInventory", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -506,40 +504,40 @@ namespace Org.OpenAPITools.Api public async System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) { - requestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); + localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); } // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/store/inventory", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetInventory", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetInventory", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -566,38 +564,37 @@ namespace Org.OpenAPITools.Api if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - - var response = this.Client.Get< Order >("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< Order >("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetOrderById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -626,38 +623,38 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (orderId != null) - requestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetOrderById", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetOrderById", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -684,37 +681,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post< Order >("/store/order", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post< Order >("/store/order", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("PlaceOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("PlaceOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -743,37 +739,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/store/order", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("PlaceOrder", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("PlaceOrder", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs index 0bc4e77768a..3f1585ce46e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs @@ -519,35 +519,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -575,35 +574,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -629,35 +628,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user/createWithArray", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithArrayInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -685,35 +683,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user/createWithArray", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithArrayInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -739,35 +737,34 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Post("/user/createWithList", requestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithListInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithListInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -795,35 +792,35 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - requestOptions.Data = body; + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/user/createWithList", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("CreateUsersWithListInput", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("CreateUsersWithListInput", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -849,36 +846,35 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - - var response = this.Client.Delete("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -906,36 +902,36 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.DeleteAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("DeleteUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -962,38 +958,37 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - - var response = this.Client.Get< User >("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< User >("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetUserByName", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1022,38 +1017,38 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("GetUserByName", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1086,56 +1081,55 @@ namespace Org.OpenAPITools.Api if (password == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (password != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request - - var response = this.Client.Get< string >("/user/login", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get< string >("/user/login", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LoginUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LoginUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1170,40 +1164,40 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { "application/xml", "application/json" }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (password != null) { - foreach (var kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) { - foreach (var value in kvp.Value) + foreach (var _kvpValue in _kvp.Value) { - requestOptions.QueryParameters.Add(kvp.Key, value); + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } @@ -1211,15 +1205,15 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/login", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LoginUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LoginUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1239,34 +1233,33 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); // make the HTTP request - - var response = this.Client.Get("/user/logout", requestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LogoutUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LogoutUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1288,34 +1281,34 @@ namespace Org.OpenAPITools.Api public async System.Threading.Tasks.Task> LogoutUserAsyncWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); // make the HTTP request - var response = await this.AsynchronousClient.GetAsync("/user/logout", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("LogoutUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("LogoutUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1347,37 +1340,36 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(@contentTypes); - if (localVarContentType != null) requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(@accepts); - if (localVarAccept != null) requestOptions.HeaderParameters.Add("Accept", localVarAccept); + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - requestOptions.Data = body; + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Data = body; // make the HTTP request - - var response = this.Client.Put("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } /// @@ -1411,37 +1403,37 @@ namespace Org.OpenAPITools.Api throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); - String[] @contentTypes = new String[] { + String[] _contentTypes = new String[] { }; // to determine the Accept header - String[] @accepts = new String[] { + String[] _accepts = new String[] { }; - foreach (var contentType in @contentTypes) - requestOptions.HeaderParameters.Add("Content-Type", contentType); + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - foreach (var accept in @accepts) - requestOptions.HeaderParameters.Add("Accept", accept); + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); if (username != null) - requestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - requestOptions.Data = body; + localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter + localVarRequestOptions.Data = body; // make the HTTP request - var response = await this.AsynchronousClient.PutAsync("/user/{username}", requestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception exception = this.ExceptionFactory("UpdateUser", response); - if (exception != null) throw exception; + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); + if (_exception != null) throw _exception; } - return response; + return localVarResponse; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index dcdb39631c5..7bd9201f88b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -119,6 +119,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index 2738b9e1853..a295fe0554f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | @@ -1034,3 +1035,84 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestQueryParameterCollectionFormat + +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md index 0d921285ba1..92d7d1e0104 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **DateTime** | **DateTime** | | [optional] **Uuid** | **Guid** | | [optional] **Password** | **string** | | +**BigDecimal** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md index 4a2624f1118..043d2442b4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md index 77b9b2e7501..bfd7955e5b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md index f4581ec1051..8ea3b95919b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md index e92681b8cba..b9573673baf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | **NumberItem** | **decimal** | | +**FloatItem** | **float** | | **IntegerItem** | **int** | | **BoolItem** | **bool** | | **ArrayItem** | **List<int>** | | diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh index 4d22bfef4d7..ced3be2b0c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs index bfde276a073..4064d18eb89 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs @@ -351,6 +351,35 @@ namespace Org.OpenAPITools.Api /// field2 /// ApiResponse of Object(void) ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Synchronous Operations } @@ -1473,5 +1502,93 @@ namespace Org.OpenAPITools.Api null); } + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "/fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs index 41aa19a8acb..018c10fb606 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs @@ -51,7 +51,8 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) + /// bigDecimal. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { // to ensure "number" is required (not null) if (number == null) @@ -102,6 +103,7 @@ namespace Org.OpenAPITools.Model this.Binary = binary; this.DateTime = dateTime; this.Uuid = uuid; + this.BigDecimal = bigDecimal; } /// @@ -183,6 +185,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="password", EmitDefaultValue=false)] public string Password { get; set; } + /// + /// Gets or Sets BigDecimal + /// + [DataMember(Name="BigDecimal", EmitDefaultValue=false)] + public decimal BigDecimal { get; set; } + /// /// Returns the string presentation of the object /// @@ -204,6 +212,7 @@ namespace Org.OpenAPITools.Model sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -302,6 +311,11 @@ namespace Org.OpenAPITools.Model this.Password == input.Password || (this.Password != null && this.Password.Equals(input.Password)) + ) && + ( + this.BigDecimal == input.BigDecimal || + (this.BigDecimal != null && + this.BigDecimal.Equals(input.BigDecimal)) ); } @@ -340,6 +354,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.BigDecimal != null) + hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs index d25dd01e456..086e142bed6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -40,10 +40,11 @@ namespace Org.OpenAPITools.Model /// /// stringItem (required). /// numberItem (required). + /// floatItem (required). /// integerItem (required). /// boolItem (required). /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) + public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) if (stringItem == null) @@ -65,6 +66,16 @@ namespace Org.OpenAPITools.Model this.NumberItem = numberItem; } + // to ensure "floatItem" is required (not null) + if (floatItem == null) + { + throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); + } + else + { + this.FloatItem = floatItem; + } + // to ensure "integerItem" is required (not null) if (integerItem == null) { @@ -109,6 +120,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="number_item", EmitDefaultValue=false)] public decimal NumberItem { get; set; } + /// + /// Gets or Sets FloatItem + /// + [DataMember(Name="float_item", EmitDefaultValue=false)] + public float FloatItem { get; set; } + /// /// Gets or Sets IntegerItem /// @@ -137,6 +154,7 @@ namespace Org.OpenAPITools.Model sb.Append("class TypeHolderExample {\n"); sb.Append(" StringItem: ").Append(StringItem).Append("\n"); sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); + sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); @@ -184,6 +202,11 @@ namespace Org.OpenAPITools.Model (this.NumberItem != null && this.NumberItem.Equals(input.NumberItem)) ) && + ( + this.FloatItem == input.FloatItem || + (this.FloatItem != null && + this.FloatItem.Equals(input.FloatItem)) + ) && ( this.IntegerItem == input.IntegerItem || (this.IntegerItem != null && @@ -215,6 +238,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.StringItem.GetHashCode(); if (this.NumberItem != null) hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); + if (this.FloatItem != null) + hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); if (this.IntegerItem != null) hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); if (this.BoolItem != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index dcdb39631c5..7bd9201f88b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -119,6 +119,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index 2738b9e1853..a295fe0554f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | @@ -1034,3 +1035,84 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestQueryParameterCollectionFormat + +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md index 0d921285ba1..92d7d1e0104 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **DateTime** | **DateTime** | | [optional] **Uuid** | **Guid** | | [optional] **Password** | **string** | | +**BigDecimal** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md index 4a2624f1118..043d2442b4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md index 77b9b2e7501..bfd7955e5b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md index f4581ec1051..8ea3b95919b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md index e92681b8cba..b9573673baf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | **NumberItem** | **decimal** | | +**FloatItem** | **float** | | **IntegerItem** | **int** | | **BoolItem** | **bool** | | **ArrayItem** | **List<int>** | | diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh index 4d22bfef4d7..ced3be2b0c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs index bfc925356e0..7d8cf0e1ee6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs @@ -351,6 +351,35 @@ namespace Org.OpenAPITools.Api /// field2 /// ApiResponse of Object(void) ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Synchronous Operations } @@ -1473,5 +1502,93 @@ namespace Org.OpenAPITools.Api null); } + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "/fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs index b8735b8587d..31193ac3960 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs @@ -51,7 +51,8 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) + /// bigDecimal. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { // to ensure "number" is required (not null) if (number == null) @@ -102,6 +103,7 @@ namespace Org.OpenAPITools.Model this.Binary = binary; this.DateTime = dateTime; this.Uuid = uuid; + this.BigDecimal = bigDecimal; } /// @@ -183,6 +185,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="password", EmitDefaultValue=false)] public string Password { get; set; } + /// + /// Gets or Sets BigDecimal + /// + [DataMember(Name="BigDecimal", EmitDefaultValue=false)] + public decimal BigDecimal { get; set; } + /// /// Returns the string presentation of the object /// @@ -204,6 +212,7 @@ namespace Org.OpenAPITools.Model sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -302,6 +311,11 @@ namespace Org.OpenAPITools.Model this.Password == input.Password || (this.Password != null && this.Password.Equals(input.Password)) + ) && + ( + this.BigDecimal == input.BigDecimal || + (this.BigDecimal != null && + this.BigDecimal.Equals(input.BigDecimal)) ); } @@ -340,6 +354,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.BigDecimal != null) + hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 384b5dbbc95..f72c763b039 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -40,10 +40,11 @@ namespace Org.OpenAPITools.Model /// /// stringItem (required). /// numberItem (required). + /// floatItem (required). /// integerItem (required). /// boolItem (required). /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) + public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) if (stringItem == null) @@ -65,6 +66,16 @@ namespace Org.OpenAPITools.Model this.NumberItem = numberItem; } + // to ensure "floatItem" is required (not null) + if (floatItem == null) + { + throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); + } + else + { + this.FloatItem = floatItem; + } + // to ensure "integerItem" is required (not null) if (integerItem == null) { @@ -109,6 +120,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="number_item", EmitDefaultValue=false)] public decimal NumberItem { get; set; } + /// + /// Gets or Sets FloatItem + /// + [DataMember(Name="float_item", EmitDefaultValue=false)] + public float FloatItem { get; set; } + /// /// Gets or Sets IntegerItem /// @@ -137,6 +154,7 @@ namespace Org.OpenAPITools.Model sb.Append("class TypeHolderExample {\n"); sb.Append(" StringItem: ").Append(StringItem).Append("\n"); sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); + sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); @@ -184,6 +202,11 @@ namespace Org.OpenAPITools.Model (this.NumberItem != null && this.NumberItem.Equals(input.NumberItem)) ) && + ( + this.FloatItem == input.FloatItem || + (this.FloatItem != null && + this.FloatItem.Equals(input.FloatItem)) + ) && ( this.IntegerItem == input.IntegerItem || (this.IntegerItem != null && @@ -215,6 +238,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.StringItem.GetHashCode(); if (this.NumberItem != null) hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); + if (this.FloatItem != null) + hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); if (this.IntegerItem != null) hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); if (this.BoolItem != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md index 260c3df449a..a5bb974627f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md @@ -95,6 +95,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index 2738b9e1853..a295fe0554f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | @@ -1034,3 +1035,84 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestQueryParameterCollectionFormat + +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md index 0d921285ba1..92d7d1e0104 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **DateTime** | **DateTime** | | [optional] **Uuid** | **Guid** | | [optional] **Password** | **string** | | +**BigDecimal** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md index 4a2624f1118..043d2442b4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md index 77b9b2e7501..bfd7955e5b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md index f4581ec1051..8ea3b95919b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md index e92681b8cba..b9573673baf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | **NumberItem** | **decimal** | | +**FloatItem** | **float** | | **IntegerItem** | **int** | | **BoolItem** | **bool** | | **ArrayItem** | **List<int>** | | diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh index 4d22bfef4d7..ced3be2b0c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 76d5194e5a1..1ad994047eb 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -197,7 +197,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > Call123TestSpecialTagsWithHttpInfo (ModelClient body) + public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs index 28964720a9a..9eb33690b17 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - bool FakeOuterBooleanSerialize (bool body = null); + bool FakeOuterBooleanSerialize (bool body = default(bool)); /// /// @@ -65,7 +65,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = null); + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)); /// /// /// @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null); + OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); /// /// @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -96,7 +96,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - decimal FakeOuterNumberSerialize (decimal body = null); + decimal FakeOuterNumberSerialize (decimal body = default(decimal)); /// /// @@ -107,7 +107,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = null); + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)); /// /// /// @@ -117,7 +117,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - string FakeOuterStringSerialize (string body = null); + string FakeOuterStringSerialize (string body = default(string)); /// /// @@ -128,7 +128,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = null); + ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); /// /// /// @@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -240,7 +240,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -257,7 +257,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -275,7 +275,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -290,7 +290,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); /// /// Fake endpoint to test group parameters (optional) @@ -306,7 +306,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); /// /// test inline additionalProperties /// @@ -351,6 +351,35 @@ namespace Org.OpenAPITools.Api /// field2 /// ApiResponse of Object(void) ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -383,7 +412,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = null); + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)); /// /// @@ -394,7 +423,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = null); + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)); /// /// /// @@ -404,7 +433,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)); /// /// @@ -415,7 +444,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)); /// /// /// @@ -425,7 +454,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = null); + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)); /// /// @@ -436,7 +465,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = null); + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)); /// /// /// @@ -446,7 +475,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)); /// /// @@ -457,7 +486,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null); + System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)); /// /// /// @@ -545,7 +574,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -569,7 +598,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// /// To test enum parameters /// @@ -586,7 +615,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// To test enum parameters @@ -604,7 +633,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); + System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)); /// /// Fake endpoint to test group parameters (optional) /// @@ -619,7 +648,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); /// /// Fake endpoint to test group parameters (optional) @@ -635,7 +664,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)); /// /// test inline additionalProperties /// @@ -680,6 +709,35 @@ namespace Org.OpenAPITools.Api /// field2 /// Task of ApiResponse System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Asynchronous Operations } @@ -952,7 +1010,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// bool - public bool FakeOuterBooleanSerialize (bool body = null) + public bool FakeOuterBooleanSerialize (bool body = default(bool)) { ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -964,7 +1022,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// ApiResponse of bool - public ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool body = null) + public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool body = default(bool)) { var localVarPath = "./fake/outer/boolean"; @@ -1022,7 +1080,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = null) + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool body = default(bool)) { ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1035,7 +1093,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input boolean as post body (optional) /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = null) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool body = default(bool)) { var localVarPath = "./fake/outer/boolean"; @@ -1093,7 +1151,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) + public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) { ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1105,7 +1163,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// ApiResponse of OuterComposite - public ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) + public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) { var localVarPath = "./fake/outer/composite"; @@ -1163,7 +1221,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = null) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite)) { ApiResponse localVarResponse = await FakeOuterCompositeSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1176,7 +1234,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input composite as post body (optional) /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = null) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeAsyncWithHttpInfo (OuterComposite body = default(OuterComposite)) { var localVarPath = "./fake/outer/composite"; @@ -1234,7 +1292,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// decimal - public decimal FakeOuterNumberSerialize (decimal body = null) + public decimal FakeOuterNumberSerialize (decimal body = default(decimal)) { ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1246,7 +1304,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// ApiResponse of decimal - public ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal body = null) + public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal body = default(decimal)) { var localVarPath = "./fake/outer/number"; @@ -1304,7 +1362,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = null) + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal body = default(decimal)) { ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1317,7 +1375,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input number as post body (optional) /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = null) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal body = default(decimal)) { var localVarPath = "./fake/outer/number"; @@ -1375,7 +1433,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// string - public string FakeOuterStringSerialize (string body = null) + public string FakeOuterStringSerialize (string body = default(string)) { ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1387,7 +1445,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// ApiResponse of string - public ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null) + public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) { var localVarPath = "./fake/outer/string"; @@ -1445,7 +1503,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = null) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string)) { ApiResponse localVarResponse = await FakeOuterStringSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1458,7 +1516,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Input string as post body (optional) /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = null) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeAsyncWithHttpInfo (string body = default(string)) { var localVarPath = "./fake/outer/string"; @@ -1830,7 +1888,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body) + public ApiResponse TestClientModelWithHttpInfo (ModelClient body) { // verify the required parameter 'body' is set if (body == null) @@ -1980,7 +2038,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2004,7 +2062,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) + public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2099,7 +2157,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -2124,7 +2182,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)) { // verify the required parameter 'number' is set if (number == null) @@ -2213,7 +2271,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// - public void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2231,7 +2289,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2296,7 +2354,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) { await TestEnumParametersAsyncWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -2315,7 +2373,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + public async System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int enumQueryInteger = default(int), double enumQueryDouble = default(double), List enumFormStringArray = default(List), string enumFormString = default(string)) { var localVarPath = "./fake"; @@ -2378,7 +2436,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2394,7 +2452,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) + public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2463,7 +2521,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2480,7 +2538,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = default(int), bool booleanGroup = default(bool), long int64Group = default(long)) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) @@ -2826,5 +2884,182 @@ namespace Org.OpenAPITools.Api null); } + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "./fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context) + { + await TestQueryParameterCollectionFormatAsyncWithHttpInfo(pipe, ioutil, http, url, context); + + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "./fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 15a124d69b3..4e181eeb4f7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -197,7 +197,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// client model /// ApiResponse of ModelClient - public ApiResponse< ModelClient > TestClassnameWithHttpInfo (ModelClient body) + public ApiResponse TestClassnameWithHttpInfo (ModelClient body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs index 661edb06173..835858d4b10 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - void DeletePet (long petId, string apiKey = null); + void DeletePet (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -67,7 +67,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null); + ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm (long petId, string name = null, string status = null); + void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -176,7 +176,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null); + ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -201,7 +201,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -213,7 +213,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -226,7 +226,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -260,7 +260,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null); + System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)); /// /// Deletes a pet @@ -272,7 +272,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null); + System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)); /// /// Finds Pets by status /// @@ -368,7 +368,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null); + System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)); /// /// Updates a pet in the store with form data @@ -381,7 +381,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null); + System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)); /// /// uploads an image /// @@ -393,7 +393,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image @@ -406,7 +406,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); /// /// uploads an image (required) /// @@ -418,7 +418,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); /// /// uploads an image (required) @@ -431,7 +431,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Asynchronous Operations } @@ -709,7 +709,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - public void DeletePet (long petId, string apiKey = null) + public void DeletePet (long petId, string apiKey = default(string)) { DeletePetWithHttpInfo(petId, apiKey); } @@ -721,7 +721,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null) + public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -782,7 +782,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null) + public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string)) { await DeletePetAsyncWithHttpInfo(petId, apiKey); @@ -795,7 +795,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null) + public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -867,7 +867,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Status values that need to be considered for filter /// ApiResponse of List<Pet> - public ApiResponse< List > FindPetsByStatusWithHttpInfo (List status) + public ApiResponse> FindPetsByStatusWithHttpInfo (List status) { // verify the required parameter 'status' is set if (status == null) @@ -1014,7 +1014,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Tags to filter by /// ApiResponse of List<Pet> - public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags) + public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) { // verify the required parameter 'tags' is set if (tags == null) @@ -1161,7 +1161,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// ApiResponse of Pet - public ApiResponse< Pet > GetPetByIdWithHttpInfo (long petId) + public ApiResponse GetPetByIdWithHttpInfo (long petId) { // verify the required parameter 'petId' is set if (petId == null) @@ -1455,7 +1455,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm (long petId, string name = null, string status = null) + public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1468,7 +1468,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null) + public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1532,7 +1532,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string)) { await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status); @@ -1546,7 +1546,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null) + public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1610,7 +1610,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1624,7 +1624,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1689,7 +1689,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1704,7 +1704,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1769,7 +1769,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1783,7 +1783,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) @@ -1851,7 +1851,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1866,7 +1866,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { // verify the required parameter 'petId' is set if (petId == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs index c2ba2b259f8..c7e01ce602b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs @@ -446,7 +446,7 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ApiResponse of Dictionary<string, int> - public ApiResponse< Dictionary > GetInventoryWithHttpInfo () + public ApiResponse> GetInventoryWithHttpInfo () { var localVarPath = "./store/inventory"; @@ -579,7 +579,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of Order - public ApiResponse< Order > GetOrderByIdWithHttpInfo (long orderId) + public ApiResponse GetOrderByIdWithHttpInfo (long orderId) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -714,7 +714,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// order placed for purchasing the pet /// ApiResponse of Order - public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body) + public ApiResponse PlaceOrderWithHttpInfo (Order body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs index 27a34b44a5c..0273aa89c37 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs @@ -1053,7 +1053,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// The name that needs to be fetched. Use user1 for testing. /// ApiResponse of User - public ApiResponse< User > GetUserByNameWithHttpInfo (string username) + public ApiResponse GetUserByNameWithHttpInfo (string username) { // verify the required parameter 'username' is set if (username == null) @@ -1190,7 +1190,7 @@ namespace Org.OpenAPITools.Api /// The user name for login /// The password for login in clear text /// ApiResponse of string - public ApiResponse< string > LoginUserWithHttpInfo (string username, string password) + public ApiResponse LoginUserWithHttpInfo (string username, string password) { // verify the required parameter 'username' is set if (username == null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs index 0311cd3aef5..3d9c30ab1fc 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs @@ -207,6 +207,7 @@ namespace Org.OpenAPITools.Client var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, contentType); + RestClient.UserAgent = Configuration.UserAgent; InterceptRequest(request); var response = await RestClient.Execute(request); InterceptResponse(request, response); diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs index 38e06b90271..714402191f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs @@ -49,7 +49,8 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) + /// bigDecimal. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { // to ensure "number" is required (not null) if (number == null) @@ -100,6 +101,7 @@ namespace Org.OpenAPITools.Model this.Binary = binary; this.DateTime = dateTime; this.Uuid = uuid; + this.BigDecimal = bigDecimal; } /// @@ -181,6 +183,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="password", EmitDefaultValue=false)] public string Password { get; set; } + /// + /// Gets or Sets BigDecimal + /// + [DataMember(Name="BigDecimal", EmitDefaultValue=false)] + public decimal BigDecimal { get; set; } + /// /// Returns the string presentation of the object /// @@ -202,6 +210,7 @@ namespace Org.OpenAPITools.Model sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -300,6 +309,11 @@ namespace Org.OpenAPITools.Model this.Password == input.Password || (this.Password != null && this.Password.Equals(input.Password)) + ) && + ( + this.BigDecimal == input.BigDecimal || + (this.BigDecimal != null && + this.BigDecimal.Equals(input.BigDecimal)) ); } @@ -338,6 +352,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.BigDecimal != null) + hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 171fa8b99ff..a4c7d9f028d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -38,10 +38,11 @@ namespace Org.OpenAPITools.Model /// /// stringItem (required). /// numberItem (required). + /// floatItem (required). /// integerItem (required). /// boolItem (required). /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) + public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) if (stringItem == null) @@ -63,6 +64,16 @@ namespace Org.OpenAPITools.Model this.NumberItem = numberItem; } + // to ensure "floatItem" is required (not null) + if (floatItem == null) + { + throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); + } + else + { + this.FloatItem = floatItem; + } + // to ensure "integerItem" is required (not null) if (integerItem == null) { @@ -107,6 +118,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="number_item", EmitDefaultValue=false)] public decimal NumberItem { get; set; } + /// + /// Gets or Sets FloatItem + /// + [DataMember(Name="float_item", EmitDefaultValue=false)] + public float FloatItem { get; set; } + /// /// Gets or Sets IntegerItem /// @@ -135,6 +152,7 @@ namespace Org.OpenAPITools.Model sb.Append("class TypeHolderExample {\n"); sb.Append(" StringItem: ").Append(StringItem).Append("\n"); sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); + sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); @@ -182,6 +200,11 @@ namespace Org.OpenAPITools.Model (this.NumberItem != null && this.NumberItem.Equals(input.NumberItem)) ) && + ( + this.FloatItem == input.FloatItem || + (this.FloatItem != null && + this.FloatItem.Equals(input.FloatItem)) + ) && ( this.IntegerItem == input.IntegerItem || (this.IntegerItem != null && @@ -213,6 +236,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.StringItem.GetHashCode(); if (this.NumberItem != null) hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); + if (this.FloatItem != null) + hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); if (this.IntegerItem != null) hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); if (this.BoolItem != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index 260c3df449a..a5bb974627f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -95,6 +95,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index 2738b9e1853..a295fe0554f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | @@ -1034,3 +1035,84 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestQueryParameterCollectionFormat + +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md index 0d921285ba1..92d7d1e0104 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **DateTime** | **DateTime** | | [optional] **Uuid** | **Guid** | | [optional] **Password** | **string** | | +**BigDecimal** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md index 4a2624f1118..043d2442b4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md index 77b9b2e7501..bfd7955e5b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md index f4581ec1051..8ea3b95919b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md index e92681b8cba..b9573673baf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | **NumberItem** | **decimal** | | +**FloatItem** | **float** | | **IntegerItem** | **int** | | **BoolItem** | **bool** | | **ArrayItem** | **List<int>** | | diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh index 4d22bfef4d7..ced3be2b0c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs index f16e8c0a1c9..9eb33690b17 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs @@ -351,6 +351,35 @@ namespace Org.OpenAPITools.Api /// field2 /// ApiResponse of Object(void) ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -680,6 +709,35 @@ namespace Org.OpenAPITools.Api /// field2 /// Task of ApiResponse System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Asynchronous Operations } @@ -2826,5 +2884,182 @@ namespace Org.OpenAPITools.Api null); } + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "./fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context) + { + await TestQueryParameterCollectionFormatAsyncWithHttpInfo(pipe, ioutil, http, url, context); + + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "./fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs index 0311cd3aef5..3d9c30ab1fc 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs @@ -207,6 +207,7 @@ namespace Org.OpenAPITools.Client var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, contentType); + RestClient.UserAgent = Configuration.UserAgent; InterceptRequest(request); var response = await RestClient.Execute(request); InterceptResponse(request, response); diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs index 38e06b90271..714402191f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs @@ -49,7 +49,8 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) + /// bigDecimal. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { // to ensure "number" is required (not null) if (number == null) @@ -100,6 +101,7 @@ namespace Org.OpenAPITools.Model this.Binary = binary; this.DateTime = dateTime; this.Uuid = uuid; + this.BigDecimal = bigDecimal; } /// @@ -181,6 +183,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="password", EmitDefaultValue=false)] public string Password { get; set; } + /// + /// Gets or Sets BigDecimal + /// + [DataMember(Name="BigDecimal", EmitDefaultValue=false)] + public decimal BigDecimal { get; set; } + /// /// Returns the string presentation of the object /// @@ -202,6 +210,7 @@ namespace Org.OpenAPITools.Model sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -300,6 +309,11 @@ namespace Org.OpenAPITools.Model this.Password == input.Password || (this.Password != null && this.Password.Equals(input.Password)) + ) && + ( + this.BigDecimal == input.BigDecimal || + (this.BigDecimal != null && + this.BigDecimal.Equals(input.BigDecimal)) ); } @@ -338,6 +352,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.BigDecimal != null) + hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 171fa8b99ff..a4c7d9f028d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -38,10 +38,11 @@ namespace Org.OpenAPITools.Model /// /// stringItem (required). /// numberItem (required). + /// floatItem (required). /// integerItem (required). /// boolItem (required). /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) + public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) if (stringItem == null) @@ -63,6 +64,16 @@ namespace Org.OpenAPITools.Model this.NumberItem = numberItem; } + // to ensure "floatItem" is required (not null) + if (floatItem == null) + { + throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); + } + else + { + this.FloatItem = floatItem; + } + // to ensure "integerItem" is required (not null) if (integerItem == null) { @@ -107,6 +118,12 @@ namespace Org.OpenAPITools.Model [DataMember(Name="number_item", EmitDefaultValue=false)] public decimal NumberItem { get; set; } + /// + /// Gets or Sets FloatItem + /// + [DataMember(Name="float_item", EmitDefaultValue=false)] + public float FloatItem { get; set; } + /// /// Gets or Sets IntegerItem /// @@ -135,6 +152,7 @@ namespace Org.OpenAPITools.Model sb.Append("class TypeHolderExample {\n"); sb.Append(" StringItem: ").Append(StringItem).Append("\n"); sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); + sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); @@ -182,6 +200,11 @@ namespace Org.OpenAPITools.Model (this.NumberItem != null && this.NumberItem.Equals(input.NumberItem)) ) && + ( + this.FloatItem == input.FloatItem || + (this.FloatItem != null && + this.FloatItem.Equals(input.FloatItem)) + ) && ( this.IntegerItem == input.IntegerItem || (this.IntegerItem != null && @@ -213,6 +236,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.StringItem.GetHashCode(); if (this.NumberItem != null) hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); + if (this.FloatItem != null) + hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); if (this.IntegerItem != null) hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); if (this.BoolItem != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index 83a328a9227..c3a2c7076fa 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index dcdb39631c5..7bd9201f88b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -119,6 +119,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | *FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index 2738b9e1853..a295fe0554f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | @@ -1034,3 +1035,84 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestQueryParameterCollectionFormat + +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(Configuration.Default); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md index 0d921285ba1..92d7d1e0104 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **DateTime** | **DateTime** | | [optional] **Uuid** | **Guid** | | [optional] **Password** | **string** | | +**BigDecimal** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md index 4a2624f1118..043d2442b4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md index 77b9b2e7501..bfd7955e5b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int** | | -**SnakeCase** | **int** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] +**_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md index f4581ec1051..8ea3b95919b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] +**Bar** | **string** | | [optional] [readonly] **Baz** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md index e92681b8cba..b9573673baf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | **string** | | **NumberItem** | **decimal** | | +**FloatItem** | **float** | | **IntegerItem** | **int** | | **BoolItem** | **bool** | | **ArrayItem** | **List<int>** | | diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh index 4d22bfef4d7..ced3be2b0c7 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs index b352cdd30cf..bc14d5e90f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs @@ -351,6 +351,35 @@ namespace Org.OpenAPITools.Api /// field2 /// ApiResponse of Object(void) ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -680,6 +709,35 @@ namespace Org.OpenAPITools.Api /// field2 /// Task of ApiResponse System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context); #endregion Asynchronous Operations } @@ -2826,5 +2884,182 @@ namespace Org.OpenAPITools.Api null); } + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "/fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of void + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context) + { + await TestQueryParameterCollectionFormatAsyncWithHttpInfo(pipe, ioutil, http, url, context); + + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatAsyncWithHttpInfo (List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'http' is set + if (http == null) + throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'url' is set + if (url == null) + throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + // verify the required parameter 'context' is set + if (context == null) + throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + var localVarPath = "/fake/test-query-paramters"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter + if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter + if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("space", "http", http)); // query parameter + if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter + if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs index 216469e1c8b..973dc3ec597 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs @@ -202,6 +202,7 @@ namespace Org.OpenAPITools.Client var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, contentType); + RestClient.UserAgent = Configuration.UserAgent; InterceptRequest(request); var response = await RestClient.ExecuteTaskAsync(request); InterceptResponse(request, response); diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs index a46fbf75e0a..7d83ea63868 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs index 813824c7dcd..d0205420529 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs index f3b7500070d..e50520a9744 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index b257a7c94e0..53e2fbc1d03 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -65,67 +65,67 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets MapString /// - [DataMember(Name="map_string", EmitDefaultValue=false)] + [DataMember(Name="map_string", EmitDefaultValue=true)] public Dictionary MapString { get; set; } /// /// Gets or Sets MapNumber /// - [DataMember(Name="map_number", EmitDefaultValue=false)] + [DataMember(Name="map_number", EmitDefaultValue=true)] public Dictionary MapNumber { get; set; } /// /// Gets or Sets MapInteger /// - [DataMember(Name="map_integer", EmitDefaultValue=false)] + [DataMember(Name="map_integer", EmitDefaultValue=true)] public Dictionary MapInteger { get; set; } /// /// Gets or Sets MapBoolean /// - [DataMember(Name="map_boolean", EmitDefaultValue=false)] + [DataMember(Name="map_boolean", EmitDefaultValue=true)] public Dictionary MapBoolean { get; set; } /// /// Gets or Sets MapArrayInteger /// - [DataMember(Name="map_array_integer", EmitDefaultValue=false)] + [DataMember(Name="map_array_integer", EmitDefaultValue=true)] public Dictionary> MapArrayInteger { get; set; } /// /// Gets or Sets MapArrayAnytype /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=false)] + [DataMember(Name="map_array_anytype", EmitDefaultValue=true)] public Dictionary> MapArrayAnytype { get; set; } /// /// Gets or Sets MapMapString /// - [DataMember(Name="map_map_string", EmitDefaultValue=false)] + [DataMember(Name="map_map_string", EmitDefaultValue=true)] public Dictionary> MapMapString { get; set; } /// /// Gets or Sets MapMapAnytype /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] + [DataMember(Name="map_map_anytype", EmitDefaultValue=true)] public Dictionary> MapMapAnytype { get; set; } /// /// Gets or Sets Anytype1 /// - [DataMember(Name="anytype_1", EmitDefaultValue=false)] + [DataMember(Name="anytype_1", EmitDefaultValue=true)] public Object Anytype1 { get; set; } /// /// Gets or Sets Anytype2 /// - [DataMember(Name="anytype_2", EmitDefaultValue=false)] + [DataMember(Name="anytype_2", EmitDefaultValue=true)] public Object Anytype2 { get; set; } /// /// Gets or Sets Anytype3 /// - [DataMember(Name="anytype_3", EmitDefaultValue=false)] + [DataMember(Name="anytype_3", EmitDefaultValue=true)] public Object Anytype3 { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs index 616312de4aa..804cf620155 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs index 80cee47470f..9416cce1c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs index 8ee4299a057..47677884f4d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs index 9cbd3fda489..a61e6ea1477 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs index 17a34c03a31..f89e68c527b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets ClassName /// - [DataMember(Name="className", EmitDefaultValue=false)] + [DataMember(Name="className", EmitDefaultValue=true)] public string ClassName { get; set; } /// /// Gets or Sets Color /// - [DataMember(Name="color", EmitDefaultValue=false)] + [DataMember(Name="color", EmitDefaultValue=true)] public string Color { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs index 98fe54f4345..c0bf6f61b1b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -49,19 +49,19 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Code /// - [DataMember(Name="code", EmitDefaultValue=false)] + [DataMember(Name="code", EmitDefaultValue=true)] public int Code { get; set; } /// /// Gets or Sets Type /// - [DataMember(Name="type", EmitDefaultValue=false)] + [DataMember(Name="type", EmitDefaultValue=true)] public string Type { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name="message", EmitDefaultValue=false)] + [DataMember(Name="message", EmitDefaultValue=true)] public string Message { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 98ae16e5918..8a778695abf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets ArrayArrayNumber /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] + [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=true)] public List> ArrayArrayNumber { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 2d50957b75d..18389f1b048 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets ArrayNumber /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] + [DataMember(Name="ArrayNumber", EmitDefaultValue=true)] public List ArrayNumber { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs index 36ed14d9711..77de3dea9a4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -49,19 +49,19 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets ArrayOfString /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] + [DataMember(Name="array_of_string", EmitDefaultValue=true)] public List ArrayOfString { get; set; } /// /// Gets or Sets ArrayArrayOfInteger /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] + [DataMember(Name="array_array_of_integer", EmitDefaultValue=true)] public List> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] + [DataMember(Name="array_array_of_model", EmitDefaultValue=true)] public List> ArrayArrayOfModel { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs index 0771efe6210..e70ef300f16 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs @@ -55,38 +55,38 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets SmallCamel /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] + [DataMember(Name="smallCamel", EmitDefaultValue=true)] public string SmallCamel { get; set; } /// /// Gets or Sets CapitalCamel /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] + [DataMember(Name="CapitalCamel", EmitDefaultValue=true)] public string CapitalCamel { get; set; } /// /// Gets or Sets SmallSnake /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] + [DataMember(Name="small_Snake", EmitDefaultValue=true)] public string SmallSnake { get; set; } /// /// Gets or Sets CapitalSnake /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] + [DataMember(Name="Capital_Snake", EmitDefaultValue=true)] public string CapitalSnake { get; set; } /// /// Gets or Sets SCAETHFlowPoints /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] + [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=true)] public string SCAETHFlowPoints { get; set; } /// /// Name of the pet /// /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] + [DataMember(Name="ATT_NAME", EmitDefaultValue=true)] public string ATT_NAME { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs index fd2292e4052..0a3fe2a67f3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs @@ -50,7 +50,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Declawed /// - [DataMember(Name="declawed", EmitDefaultValue=false)] + [DataMember(Name="declawed", EmitDefaultValue=true)] public bool Declawed { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs index 6ab74ebda94..c6fdafbba55 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Declawed /// - [DataMember(Name="declawed", EmitDefaultValue=false)] + [DataMember(Name="declawed", EmitDefaultValue=true)] public bool Declawed { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs index 9cbb87b6802..9fa1212599a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs @@ -61,13 +61,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Id /// - [DataMember(Name="id", EmitDefaultValue=false)] + [DataMember(Name="id", EmitDefaultValue=true)] public long Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs index 3aeb9165c9f..0acefc362f9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Class /// - [DataMember(Name="_class", EmitDefaultValue=false)] + [DataMember(Name="_class", EmitDefaultValue=true)] public string Class { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs index 8f2f3c44f94..36fdef56349 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs @@ -50,7 +50,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Breed /// - [DataMember(Name="breed", EmitDefaultValue=false)] + [DataMember(Name="breed", EmitDefaultValue=true)] public string Breed { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs index 44b71001028..76a6ec39680 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Breed /// - [DataMember(Name="breed", EmitDefaultValue=false)] + [DataMember(Name="breed", EmitDefaultValue=true)] public string Breed { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs index 9e406df8978..1b1c8ddd861 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -56,7 +56,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets JustSymbol /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] + [DataMember(Name="just_symbol", EmitDefaultValue=true)] public JustSymbolEnum? JustSymbol { get; set; } /// /// Defines ArrayEnum @@ -82,7 +82,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets ArrayEnum /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] + [DataMember(Name="array_enum", EmitDefaultValue=true)] public List ArrayEnum { get; set; } /// /// Initializes a new instance of the class. diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs index c203d90263d..c712f71825e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs @@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets EnumString /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] + [DataMember(Name="enum_string", EmitDefaultValue=true)] public EnumStringEnum? EnumString { get; set; } /// /// Defines EnumStringRequired @@ -93,7 +93,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets EnumStringRequired /// - [DataMember(Name="enum_string_required", EmitDefaultValue=false)] + [DataMember(Name="enum_string_required", EmitDefaultValue=true)] public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Defines EnumInteger @@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets EnumInteger /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] + [DataMember(Name="enum_integer", EmitDefaultValue=true)] public EnumIntegerEnum? EnumInteger { get; set; } /// /// Defines EnumNumber @@ -140,12 +140,12 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets EnumNumber /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] + [DataMember(Name="enum_number", EmitDefaultValue=true)] public EnumNumberEnum? EnumNumber { get; set; } /// /// Gets or Sets OuterEnum /// - [DataMember(Name="outerEnum", EmitDefaultValue=false)] + [DataMember(Name="outerEnum", EmitDefaultValue=true)] public OuterEnum? OuterEnum { get; set; } /// /// Initializes a new instance of the class. diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs index 5c620ce678e..c4f5fe75423 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs @@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model /// Test capitalization /// /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] + [DataMember(Name="sourceURI", EmitDefaultValue=true)] public string SourceURI { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index c4d1be9b8f2..9cb575ad45d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets File /// - [DataMember(Name="file", EmitDefaultValue=false)] + [DataMember(Name="file", EmitDefaultValue=true)] public File File { get; set; } /// /// Gets or Sets Files /// - [DataMember(Name="files", EmitDefaultValue=false)] + [DataMember(Name="files", EmitDefaultValue=true)] public List Files { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs index 74d043b9b9c..d8452eb07cb 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs @@ -54,7 +54,8 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) + /// bigDecimal. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { // to ensure "number" is required (not null) if (number == null) @@ -105,87 +106,94 @@ namespace Org.OpenAPITools.Model this.Binary = binary; this.DateTime = dateTime; this.Uuid = uuid; + this.BigDecimal = bigDecimal; } /// /// Gets or Sets Integer /// - [DataMember(Name="integer", EmitDefaultValue=false)] + [DataMember(Name="integer", EmitDefaultValue=true)] public int Integer { get; set; } /// /// Gets or Sets Int32 /// - [DataMember(Name="int32", EmitDefaultValue=false)] + [DataMember(Name="int32", EmitDefaultValue=true)] public int Int32 { get; set; } /// /// Gets or Sets Int64 /// - [DataMember(Name="int64", EmitDefaultValue=false)] + [DataMember(Name="int64", EmitDefaultValue=true)] public long Int64 { get; set; } /// /// Gets or Sets Number /// - [DataMember(Name="number", EmitDefaultValue=false)] + [DataMember(Name="number", EmitDefaultValue=true)] public decimal Number { get; set; } /// /// Gets or Sets Float /// - [DataMember(Name="float", EmitDefaultValue=false)] + [DataMember(Name="float", EmitDefaultValue=true)] public float Float { get; set; } /// /// Gets or Sets Double /// - [DataMember(Name="double", EmitDefaultValue=false)] + [DataMember(Name="double", EmitDefaultValue=true)] public double Double { get; set; } /// /// Gets or Sets String /// - [DataMember(Name="string", EmitDefaultValue=false)] + [DataMember(Name="string", EmitDefaultValue=true)] public string String { get; set; } /// /// Gets or Sets Byte /// - [DataMember(Name="byte", EmitDefaultValue=false)] + [DataMember(Name="byte", EmitDefaultValue=true)] public byte[] Byte { get; set; } /// /// Gets or Sets Binary /// - [DataMember(Name="binary", EmitDefaultValue=false)] + [DataMember(Name="binary", EmitDefaultValue=true)] public System.IO.Stream Binary { get; set; } /// /// Gets or Sets Date /// - [DataMember(Name="date", EmitDefaultValue=false)] + [DataMember(Name="date", EmitDefaultValue=true)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime Date { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] + [DataMember(Name="dateTime", EmitDefaultValue=true)] public DateTime DateTime { get; set; } /// /// Gets or Sets Uuid /// - [DataMember(Name="uuid", EmitDefaultValue=false)] + [DataMember(Name="uuid", EmitDefaultValue=true)] public Guid Uuid { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } + /// + /// Gets or Sets BigDecimal + /// + [DataMember(Name="BigDecimal", EmitDefaultValue=true)] + public decimal BigDecimal { get; set; } + /// /// Returns the string presentation of the object /// @@ -207,6 +215,7 @@ namespace Org.OpenAPITools.Model sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -305,6 +314,11 @@ namespace Org.OpenAPITools.Model this.Password == input.Password || (this.Password != null && this.Password.Equals(input.Password)) + ) && + ( + this.BigDecimal == input.BigDecimal || + (this.BigDecimal != null && + this.BigDecimal.Equals(input.BigDecimal)) ); } @@ -343,6 +357,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.BigDecimal != null) + hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); return hashCode; } } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index d11ee66fb67..e724c7ca643 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -44,13 +44,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Bar /// - [DataMember(Name="bar", EmitDefaultValue=false)] + [DataMember(Name="bar", EmitDefaultValue=true)] public string Bar { get; private set; } /// /// Gets or Sets Foo /// - [DataMember(Name="foo", EmitDefaultValue=false)] + [DataMember(Name="foo", EmitDefaultValue=true)] public string Foo { get; private set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs index d99b5931f2f..01efc109c14 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets _123List /// - [DataMember(Name="123-list", EmitDefaultValue=false)] + [DataMember(Name="123-list", EmitDefaultValue=true)] public string _123List { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs index 39e6c4118b4..c7aea9f5b94 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets MapOfEnumString /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] + [DataMember(Name="map_of_enum_string", EmitDefaultValue=true)] public Dictionary MapOfEnumString { get; set; } /// /// Initializes a new instance of the class. @@ -77,20 +77,20 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets MapMapOfString /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] + [DataMember(Name="map_map_of_string", EmitDefaultValue=true)] public Dictionary> MapMapOfString { get; set; } /// /// Gets or Sets DirectMap /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] + [DataMember(Name="direct_map", EmitDefaultValue=true)] public Dictionary DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] + [DataMember(Name="indirect_map", EmitDefaultValue=true)] public Dictionary IndirectMap { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 0c125e4c384..f27d3cf0c9f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -49,19 +49,19 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Uuid /// - [DataMember(Name="uuid", EmitDefaultValue=false)] + [DataMember(Name="uuid", EmitDefaultValue=true)] public Guid Uuid { get; set; } /// /// Gets or Sets DateTime /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] + [DataMember(Name="dateTime", EmitDefaultValue=true)] public DateTime DateTime { get; set; } /// /// Gets or Sets Map /// - [DataMember(Name="map", EmitDefaultValue=false)] + [DataMember(Name="map", EmitDefaultValue=true)] public Dictionary Map { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs index 5cf0b86e291..964a9356b1d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int Name { get; set; } /// /// Gets or Sets Class /// - [DataMember(Name="class", EmitDefaultValue=false)] + [DataMember(Name="class", EmitDefaultValue=true)] public string Class { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs index f1fed19b898..9475dae0c17 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets __Client /// - [DataMember(Name="client", EmitDefaultValue=false)] + [DataMember(Name="client", EmitDefaultValue=true)] public string __Client { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs index 715ccf58cc3..375b734096c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs @@ -61,25 +61,25 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets _Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public int _Name { get; set; } /// /// Gets or Sets SnakeCase /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] + [DataMember(Name="snake_case", EmitDefaultValue=true)] public int SnakeCase { get; private set; } /// /// Gets or Sets Property /// - [DataMember(Name="property", EmitDefaultValue=false)] + [DataMember(Name="property", EmitDefaultValue=true)] public string Property { get; set; } /// /// Gets or Sets _123Number /// - [DataMember(Name="123Number", EmitDefaultValue=false)] + [DataMember(Name="123Number", EmitDefaultValue=true)] public int _123Number { get; private set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs index 8a8eecca6be..9177961e48c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets JustNumber /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] + [DataMember(Name="JustNumber", EmitDefaultValue=true)] public decimal JustNumber { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs index f78f9cfef34..3f6a949034b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs @@ -64,7 +64,7 @@ namespace Org.OpenAPITools.Model /// Order Status /// /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] + [DataMember(Name="status", EmitDefaultValue=true)] public StatusEnum? Status { get; set; } /// /// Initializes a new instance of the class. @@ -96,32 +96,32 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Id /// - [DataMember(Name="id", EmitDefaultValue=false)] + [DataMember(Name="id", EmitDefaultValue=true)] public long Id { get; set; } /// /// Gets or Sets PetId /// - [DataMember(Name="petId", EmitDefaultValue=false)] + [DataMember(Name="petId", EmitDefaultValue=true)] public long PetId { get; set; } /// /// Gets or Sets Quantity /// - [DataMember(Name="quantity", EmitDefaultValue=false)] + [DataMember(Name="quantity", EmitDefaultValue=true)] public int Quantity { get; set; } /// /// Gets or Sets ShipDate /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] + [DataMember(Name="shipDate", EmitDefaultValue=true)] public DateTime ShipDate { get; set; } /// /// Gets or Sets Complete /// - [DataMember(Name="complete", EmitDefaultValue=false)] + [DataMember(Name="complete", EmitDefaultValue=true)] public bool Complete { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs index c34bb749023..ea3efcaccdf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -49,19 +49,19 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets MyNumber /// - [DataMember(Name="my_number", EmitDefaultValue=false)] + [DataMember(Name="my_number", EmitDefaultValue=true)] public decimal MyNumber { get; set; } /// /// Gets or Sets MyString /// - [DataMember(Name="my_string", EmitDefaultValue=false)] + [DataMember(Name="my_string", EmitDefaultValue=true)] public string MyString { get; set; } /// /// Gets or Sets MyBoolean /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] + [DataMember(Name="my_boolean", EmitDefaultValue=true)] public bool MyBoolean { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs index 6dd381cb46e..bc97933a002 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs @@ -64,7 +64,7 @@ namespace Org.OpenAPITools.Model /// pet status in the store /// /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] + [DataMember(Name="status", EmitDefaultValue=true)] public StatusEnum? Status { get; set; } /// /// Initializes a new instance of the class. @@ -111,31 +111,31 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Id /// - [DataMember(Name="id", EmitDefaultValue=false)] + [DataMember(Name="id", EmitDefaultValue=true)] public long Id { get; set; } /// /// Gets or Sets Category /// - [DataMember(Name="category", EmitDefaultValue=false)] + [DataMember(Name="category", EmitDefaultValue=true)] public Category Category { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// /// Gets or Sets PhotoUrls /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] + [DataMember(Name="photoUrls", EmitDefaultValue=true)] public List PhotoUrls { get; set; } /// /// Gets or Sets Tags /// - [DataMember(Name="tags", EmitDefaultValue=false)] + [DataMember(Name="tags", EmitDefaultValue=true)] public List Tags { get; set; } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index b3d461ac4e7..12321ca239b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -45,13 +45,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Bar /// - [DataMember(Name="bar", EmitDefaultValue=false)] + [DataMember(Name="bar", EmitDefaultValue=true)] public string Bar { get; private set; } /// /// Gets or Sets Baz /// - [DataMember(Name="baz", EmitDefaultValue=false)] + [DataMember(Name="baz", EmitDefaultValue=true)] public string Baz { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs index 097954d9a4c..0fbcfc2d0c9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets _Return /// - [DataMember(Name="return", EmitDefaultValue=false)] + [DataMember(Name="return", EmitDefaultValue=true)] public int _Return { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs index 4eab4ce1eda..b53ca1f9243 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets SpecialPropertyName /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] + [DataMember(Name="$special[property.name]", EmitDefaultValue=true)] public long SpecialPropertyName { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs index 17fb156f79e..13645a7fef5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Id /// - [DataMember(Name="id", EmitDefaultValue=false)] + [DataMember(Name="id", EmitDefaultValue=true)] public long Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name="name", EmitDefaultValue=false)] + [DataMember(Name="name", EmitDefaultValue=true)] public string Name { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 52a120fb6a4..a2659db1fc3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -103,31 +103,31 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 62f9cdb6eae..92c91656e8c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -43,10 +43,11 @@ namespace Org.OpenAPITools.Model /// /// stringItem (required). /// numberItem (required). + /// floatItem (required). /// integerItem (required). /// boolItem (required). /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) + public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) if (stringItem == null) @@ -68,6 +69,16 @@ namespace Org.OpenAPITools.Model this.NumberItem = numberItem; } + // to ensure "floatItem" is required (not null) + if (floatItem == null) + { + throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); + } + else + { + this.FloatItem = floatItem; + } + // to ensure "integerItem" is required (not null) if (integerItem == null) { @@ -103,31 +114,37 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets StringItem /// - [DataMember(Name="string_item", EmitDefaultValue=false)] + [DataMember(Name="string_item", EmitDefaultValue=true)] public string StringItem { get; set; } /// /// Gets or Sets NumberItem /// - [DataMember(Name="number_item", EmitDefaultValue=false)] + [DataMember(Name="number_item", EmitDefaultValue=true)] public decimal NumberItem { get; set; } + /// + /// Gets or Sets FloatItem + /// + [DataMember(Name="float_item", EmitDefaultValue=true)] + public float FloatItem { get; set; } + /// /// Gets or Sets IntegerItem /// - [DataMember(Name="integer_item", EmitDefaultValue=false)] + [DataMember(Name="integer_item", EmitDefaultValue=true)] public int IntegerItem { get; set; } /// /// Gets or Sets BoolItem /// - [DataMember(Name="bool_item", EmitDefaultValue=false)] + [DataMember(Name="bool_item", EmitDefaultValue=true)] public bool BoolItem { get; set; } /// /// Gets or Sets ArrayItem /// - [DataMember(Name="array_item", EmitDefaultValue=false)] + [DataMember(Name="array_item", EmitDefaultValue=true)] public List ArrayItem { get; set; } /// @@ -140,6 +157,7 @@ namespace Org.OpenAPITools.Model sb.Append("class TypeHolderExample {\n"); sb.Append(" StringItem: ").Append(StringItem).Append("\n"); sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); + sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); @@ -187,6 +205,11 @@ namespace Org.OpenAPITools.Model (this.NumberItem != null && this.NumberItem.Equals(input.NumberItem)) ) && + ( + this.FloatItem == input.FloatItem || + (this.FloatItem != null && + this.FloatItem.Equals(input.FloatItem)) + ) && ( this.IntegerItem == input.IntegerItem || (this.IntegerItem != null && @@ -218,6 +241,8 @@ namespace Org.OpenAPITools.Model hashCode = hashCode * 59 + this.StringItem.GetHashCode(); if (this.NumberItem != null) hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); + if (this.FloatItem != null) + hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); if (this.IntegerItem != null) hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); if (this.BoolItem != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs index da0b0d9b315..85697872994 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs @@ -59,50 +59,50 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Id /// - [DataMember(Name="id", EmitDefaultValue=false)] + [DataMember(Name="id", EmitDefaultValue=true)] public long Id { get; set; } /// /// Gets or Sets Username /// - [DataMember(Name="username", EmitDefaultValue=false)] + [DataMember(Name="username", EmitDefaultValue=true)] public string Username { get; set; } /// /// Gets or Sets FirstName /// - [DataMember(Name="firstName", EmitDefaultValue=false)] + [DataMember(Name="firstName", EmitDefaultValue=true)] public string FirstName { get; set; } /// /// Gets or Sets LastName /// - [DataMember(Name="lastName", EmitDefaultValue=false)] + [DataMember(Name="lastName", EmitDefaultValue=true)] public string LastName { get; set; } /// /// Gets or Sets Email /// - [DataMember(Name="email", EmitDefaultValue=false)] + [DataMember(Name="email", EmitDefaultValue=true)] public string Email { get; set; } /// /// Gets or Sets Password /// - [DataMember(Name="password", EmitDefaultValue=false)] + [DataMember(Name="password", EmitDefaultValue=true)] public string Password { get; set; } /// /// Gets or Sets Phone /// - [DataMember(Name="phone", EmitDefaultValue=false)] + [DataMember(Name="phone", EmitDefaultValue=true)] public string Phone { get; set; } /// /// User Status /// /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] + [DataMember(Name="userStatus", EmitDefaultValue=true)] public int UserStatus { get; set; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs index 406f0feb6a2..d107d64cfc8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs @@ -101,175 +101,175 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets AttributeString /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] + [DataMember(Name="attribute_string", EmitDefaultValue=true)] public string AttributeString { get; set; } /// /// Gets or Sets AttributeNumber /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] + [DataMember(Name="attribute_number", EmitDefaultValue=true)] public decimal AttributeNumber { get; set; } /// /// Gets or Sets AttributeInteger /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] + [DataMember(Name="attribute_integer", EmitDefaultValue=true)] public int AttributeInteger { get; set; } /// /// Gets or Sets AttributeBoolean /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] + [DataMember(Name="attribute_boolean", EmitDefaultValue=true)] public bool AttributeBoolean { get; set; } /// /// Gets or Sets WrappedArray /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] + [DataMember(Name="wrapped_array", EmitDefaultValue=true)] public List WrappedArray { get; set; } /// /// Gets or Sets NameString /// - [DataMember(Name="name_string", EmitDefaultValue=false)] + [DataMember(Name="name_string", EmitDefaultValue=true)] public string NameString { get; set; } /// /// Gets or Sets NameNumber /// - [DataMember(Name="name_number", EmitDefaultValue=false)] + [DataMember(Name="name_number", EmitDefaultValue=true)] public decimal NameNumber { get; set; } /// /// Gets or Sets NameInteger /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] + [DataMember(Name="name_integer", EmitDefaultValue=true)] public int NameInteger { get; set; } /// /// Gets or Sets NameBoolean /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] + [DataMember(Name="name_boolean", EmitDefaultValue=true)] public bool NameBoolean { get; set; } /// /// Gets or Sets NameArray /// - [DataMember(Name="name_array", EmitDefaultValue=false)] + [DataMember(Name="name_array", EmitDefaultValue=true)] public List NameArray { get; set; } /// /// Gets or Sets NameWrappedArray /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] + [DataMember(Name="name_wrapped_array", EmitDefaultValue=true)] public List NameWrappedArray { get; set; } /// /// Gets or Sets PrefixString /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] + [DataMember(Name="prefix_string", EmitDefaultValue=true)] public string PrefixString { get; set; } /// /// Gets or Sets PrefixNumber /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] + [DataMember(Name="prefix_number", EmitDefaultValue=true)] public decimal PrefixNumber { get; set; } /// /// Gets or Sets PrefixInteger /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] + [DataMember(Name="prefix_integer", EmitDefaultValue=true)] public int PrefixInteger { get; set; } /// /// Gets or Sets PrefixBoolean /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] + [DataMember(Name="prefix_boolean", EmitDefaultValue=true)] public bool PrefixBoolean { get; set; } /// /// Gets or Sets PrefixArray /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] + [DataMember(Name="prefix_array", EmitDefaultValue=true)] public List PrefixArray { get; set; } /// /// Gets or Sets PrefixWrappedArray /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] + [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=true)] public List PrefixWrappedArray { get; set; } /// /// Gets or Sets NamespaceString /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] + [DataMember(Name="namespace_string", EmitDefaultValue=true)] public string NamespaceString { get; set; } /// /// Gets or Sets NamespaceNumber /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] + [DataMember(Name="namespace_number", EmitDefaultValue=true)] public decimal NamespaceNumber { get; set; } /// /// Gets or Sets NamespaceInteger /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] + [DataMember(Name="namespace_integer", EmitDefaultValue=true)] public int NamespaceInteger { get; set; } /// /// Gets or Sets NamespaceBoolean /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] + [DataMember(Name="namespace_boolean", EmitDefaultValue=true)] public bool NamespaceBoolean { get; set; } /// /// Gets or Sets NamespaceArray /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] + [DataMember(Name="namespace_array", EmitDefaultValue=true)] public List NamespaceArray { get; set; } /// /// Gets or Sets NamespaceWrappedArray /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] + [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=true)] public List NamespaceWrappedArray { get; set; } /// /// Gets or Sets PrefixNsString /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_string", EmitDefaultValue=true)] public string PrefixNsString { get; set; } /// /// Gets or Sets PrefixNsNumber /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_number", EmitDefaultValue=true)] public decimal PrefixNsNumber { get; set; } /// /// Gets or Sets PrefixNsInteger /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_integer", EmitDefaultValue=true)] public int PrefixNsInteger { get; set; } /// /// Gets or Sets PrefixNsBoolean /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=true)] public bool PrefixNsBoolean { get; set; } /// /// Gets or Sets PrefixNsArray /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_array", EmitDefaultValue=true)] public List PrefixNsArray { get; set; } /// /// Gets or Sets PrefixNsWrappedArray /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] + [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=true)] public List PrefixNsWrappedArray { get; set; } /// diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION index 0e97bd19efb..c3a2c7076fa 100644 --- a/samples/client/petstore/dart-dio/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md index ded15d6b923..824ea71074d 100644 --- a/samples/client/petstore/dart-dio/README.md +++ b/samples/client/petstore/dart-dio/README.md @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Build date: 2019-10-03T14:20:56.615+13:00[Pacific/Auckland] +- Build date: 2019-10-30T08:32:55.947+13:00[Pacific/Auckland] - Build package: org.openapitools.codegen.languages.DartDioClientCodegen ## Requirements diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index fee534d8540..e65520ad76c 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -27,7 +27,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -37,12 +37,12 @@ class PetApi { List contentTypes = ["application/json", "application/xml"]; var serializedBody = _serializers.serialize(body); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -67,7 +67,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; headerParams["api_key"] = apiKey; @@ -102,7 +102,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["status"] = status; @@ -155,7 +155,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["tags"] = tags; @@ -209,7 +209,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -258,7 +258,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -268,12 +268,12 @@ class PetApi { List contentTypes = ["application/json", "application/xml"]; var serializedBody = _serializers.serialize(body); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'put'.toUpperCase(), headers: headerParams, @@ -299,7 +299,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -336,7 +336,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index 440dcd604b8..315aaa5a1c1 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -14,14 +14,15 @@ class StoreApi { StoreApi(this._dio, this._serializers); /// Delete purchase order by ID - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - Future deleteOrder(String orderId, { CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers,}) async { - // query params + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -51,7 +52,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -95,7 +96,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -139,7 +140,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -149,12 +150,12 @@ class StoreApi { List contentTypes = []; var serializedBody = _serializers.serialize(body); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'post'.toUpperCase(), headers: headerParams, diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index d30d72c3803..d10f5fea593 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -25,7 +25,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -35,12 +35,12 @@ class UserApi { List contentTypes = []; var serializedBody = _serializers.serialize(body); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -63,7 +63,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -75,12 +75,12 @@ class UserApi { final type = const FullType(BuiltList, const [const FullType(User)]); var serializedBody = _serializers.serialize(BuiltList.from(body), specifiedType: type); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -103,7 +103,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -115,12 +115,12 @@ class UserApi { final type = const FullType(BuiltList, const [const FullType(User)]); var serializedBody = _serializers.serialize(BuiltList.from(body), specifiedType: type); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -144,7 +144,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -179,7 +179,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -229,7 +229,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["username"] = username; @@ -280,7 +280,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -316,7 +316,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -326,12 +326,12 @@ class UserApi { List contentTypes = []; var serializedBody = _serializers.serialize(body); - var data = json.encode(serializedBody); + var jsonbody = json.encode(serializedBody); return _dio.request( path, queryParameters: queryParams, - data: data, + data: jsonbody, options: Options( method: 'put'.toUpperCase(), headers: headerParams, diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/lib/model/order.dart index a5bcec14b39..c04e3032ce8 100644 --- a/samples/client/petstore/dart-dio/lib/model/order.dart +++ b/samples/client/petstore/dart-dio/lib/model/order.dart @@ -25,7 +25,7 @@ abstract class Order implements Built { /* Order Status */ @BuiltValueField(wireName: 'status') String get status; - //enum statusEnum { placed, approved, delivered, };{ + //enum statusEnum { placed, approved, delivered, }; @nullable @BuiltValueField(wireName: 'complete') diff --git a/samples/client/petstore/dart-dio/lib/model/pet.dart b/samples/client/petstore/dart-dio/lib/model/pet.dart index c3554e42395..81441c4f627 100644 --- a/samples/client/petstore/dart-dio/lib/model/pet.dart +++ b/samples/client/petstore/dart-dio/lib/model/pet.dart @@ -1,6 +1,6 @@ import 'package:openapi/model/tag.dart'; -import 'package:openapi/model/category.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/model/category.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -32,7 +32,7 @@ abstract class Pet implements Built { /* pet status in the store */ @BuiltValueField(wireName: 'status') String get status; - //enum statusEnum { available, pending, sold, };{ + //enum statusEnum { available, pending, sold, }; // Boilerplate code needed to wire-up generated code Pet._(); diff --git a/samples/client/petstore/dart-dio/pubspec.yaml b/samples/client/petstore/dart-dio/pubspec.yaml index b2d0d4d00ab..2f3bd0e1255 100644 --- a/samples/client/petstore/dart-dio/pubspec.yaml +++ b/samples/client/petstore/dart-dio/pubspec.yaml @@ -5,9 +5,9 @@ environment: sdk: ">=2.3.0 <3.0.0" dependencies: dio: ^3.0.3 - built_value: 6.7.0 - built_collection: 4.2.2 + built_value: ^6.8.2 + built_collection: ^4.2.2 dev_dependencies: - built_value_generator: ^6.7.1 + built_value_generator: ^6.8.2 build_runner: ^1.7.1 test: 1.6.5 \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/go-petstore/client.go b/samples/client/petstore/go-experimental/go-petstore/client.go index 30377bdac64..c73a8db8d09 100644 --- a/samples/client/petstore/go-experimental/go-petstore/client.go +++ b/samples/client/petstore/go-experimental/go-petstore/client.go @@ -180,6 +180,12 @@ func (c *APIClient) ChangeBasePath(path string) { c.cfg.BasePath = path } +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, diff --git a/samples/client/petstore/go-experimental/go-petstore/go.mod b/samples/client/petstore/go-experimental/go-petstore/go.mod index 199809ed706..b80383b722c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/go.mod +++ b/samples/client/petstore/go-experimental/go-petstore/go.mod @@ -1,6 +1,8 @@ module github.com/GIT_USER_ID/GIT_REPO_ID +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go-experimental/go-petstore/go.sum b/samples/client/petstore/go-experimental/go-petstore/go.sum index e3c16fef3ac..ce55b3c6a08 100644 --- a/samples/client/petstore/go-experimental/go-petstore/go.sum +++ b/samples/client/petstore/go-experimental/go-petstore/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index 7791762a544..73bf022c888 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -181,6 +181,12 @@ func (c *APIClient) ChangeBasePath(path string) { c.cfg.BasePath = path } +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, diff --git a/samples/client/petstore/go/go-petstore-withXml/go.mod b/samples/client/petstore/go/go-petstore-withXml/go.mod index c7c2a426e78..1af1846f985 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.mod +++ b/samples/client/petstore/go/go-petstore-withXml/go.mod @@ -1,8 +1,6 @@ module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go/go-petstore-withXml/go.sum b/samples/client/petstore/go/go-petstore-withXml/go.sum index 97b347238f4..ce55b3c6a08 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.sum +++ b/samples/client/petstore/go/go-petstore-withXml/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index 30377bdac64..c73a8db8d09 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -180,6 +180,12 @@ func (c *APIClient) ChangeBasePath(path string) { c.cfg.BasePath = path } +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, diff --git a/samples/client/petstore/go/go-petstore/go.mod b/samples/client/petstore/go/go-petstore/go.mod index c7c2a426e78..1af1846f985 100644 --- a/samples/client/petstore/go/go-petstore/go.mod +++ b/samples/client/petstore/go/go-petstore/go.mod @@ -1,8 +1,6 @@ module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go/go-petstore/go.sum b/samples/client/petstore/go/go-petstore/go.sum index 97b347238f4..ce55b3c6a08 100644 --- a/samples/client/petstore/go/go-petstore/go.sum +++ b/samples/client/petstore/go/go-petstore/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index 51158af50d7..c8f199b701b 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" - jackson_databind_version = "2.9.10" + jackson_databind_version = "2.9.10.1" jackson_databind_nullable_version = "0.2.0" - threepane_version = "2.6.4" + jackson_threetenbp_version = "2.9.10" feign_version = "9.7.0" feign_form_version = "2.1.0" junit_version = "4.12" @@ -117,7 +117,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threepane_version" + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt index ea30abac90a..c83996e1bb8 100644 --- a/samples/client/petstore/java/feign/build.sbt +++ b/samples/client/petstore/java/feign/build.sbt @@ -16,9 +16,9 @@ lazy val root = (project in file(".")). "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml index 7004da87843..71137666166 100644 --- a/samples/client/petstore/java/feign/pom.xml +++ b/samples/client/petstore/java/feign/pom.xml @@ -283,8 +283,8 @@ 2.1.0 2.9.10 0.2.0 - 2.9.10 - 2.6.4 + 2.9.10.1 + 2.9.10 4.12 1.0.0 1.0.1 diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 1ff60b8b7a4..44511e4641c 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -36,6 +36,8 @@ public class ApiKeyAuth implements RequestInterceptor { template.query(paramName, apiKey); } else if ("header".equals(location)) { template.header(paramName, apiKey); + } else if ("cookie".equals(location)) { + template.header("Cookie", String.format("%s=%s", paramName, apiKey)); } } } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java index 80919c26036..569d7d08d59 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java index b5b50650e8d..cc04e0e022d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java index edaf45e84eb..d4f5f1c55bd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java index 5b261fff9ab..4d73ff2bbd6 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 1a43b27355f..e5996f69468 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 0e96a6db8cc..b7f141913e7 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java index a1ab7c497a0..65e7c295192 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index 0d6878503c4..f59ac8f69d1 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" - jackson_databind_version = "2.9.10" + jackson_databind_version = "2.9.10.1" jackson_databind_nullable_version = "0.2.0" - threepane_version = "2.6.4" + jackson_threetenbp_version = "2.9.10" feign_version = "10.2.3" feign_form_version = "2.1.0" junit_version = "4.12" @@ -117,7 +117,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threepane_version" + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign10x/build.sbt index dd361e262c9..75e80dd2755 100644 --- a/samples/client/petstore/java/feign10x/build.sbt +++ b/samples/client/petstore/java/feign10x/build.sbt @@ -16,9 +16,9 @@ lazy val root = (project in file(".")). "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml index caccc26d76c..6b773b2cd91 100644 --- a/samples/client/petstore/java/feign10x/pom.xml +++ b/samples/client/petstore/java/feign10x/pom.xml @@ -283,8 +283,8 @@ 2.1.0 2.9.10 0.2.0 - 2.9.10 - 2.6.4 + 2.9.10.1 + 2.9.10 4.12 1.0.0 1.0.1 diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 1ff60b8b7a4..44511e4641c 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -36,6 +36,8 @@ public class ApiKeyAuth implements RequestInterceptor { template.query(paramName, apiKey); } else if ("header".equals(location)) { template.header(paramName, apiKey); + } else if ("cookie".equals(location)) { + template.header("Cookie", String.format("%s=%s", paramName, apiKey)); } } } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java index 80919c26036..569d7d08d59 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java index b5b50650e8d..cc04e0e022d 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java index edaf45e84eb..d4f5f1c55bd 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java index 5b261fff9ab..4d73ff2bbd6 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 1a43b27355f..e5996f69468 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 0e96a6db8cc..b7f141913e7 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java index a1ab7c497a0..65e7c295192 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index a16b641c1a6..b321101fa13 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -103,7 +103,7 @@ ext { jersey_common_version = "2.25.1" jodatime_version = "2.9.9" junit_version = "4.12" - jackson_threeten_version = "2.6.4" + jackson_threeten_version = "2.9.10" } dependencies { diff --git a/samples/client/petstore/java/google-api-client/build.sbt b/samples/client/petstore/java/google-api-client/build.sbt index 1450018366b..6997a7b4aa4 100644 --- a/samples/client/petstore/java/google-api-client/build.sbt +++ b/samples/client/petstore/java/google-api-client/build.sbt @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/google-api-client/docs/ClassModel.md b/samples/client/petstore/java/google-api-client/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/google-api-client/docs/ClassModel.md +++ b/samples/client/petstore/java/google-api-client/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/google-api-client/docs/Model200Response.md b/samples/client/petstore/java/google-api-client/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/google-api-client/docs/Model200Response.md +++ b/samples/client/petstore/java/google-api-client/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/google-api-client/docs/ModelReturn.md b/samples/client/petstore/java/google-api-client/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/google-api-client/docs/ModelReturn.md +++ b/samples/client/petstore/java/google-api-client/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/google-api-client/docs/Name.md b/samples/client/petstore/java/google-api-client/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/google-api-client/docs/Name.md +++ b/samples/client/petstore/java/google-api-client/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml index 6b29ee3a8a1..593b8d20ffc 100644 --- a/samples/client/petstore/java/google-api-client/pom.xml +++ b/samples/client/petstore/java/google-api-client/pom.xml @@ -261,7 +261,7 @@ 2.9.10 2.9.10 0.2.0 - 2.6.4 + 2.9.10 1.0.0 4.12 diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java index dabd18a06a1..6e281630216 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c9bb8bcebec..73f39358794 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 32a4d8bb6e4..e3daa1a3e1c 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java index 75b1edce8d9..f585a625223 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index e94fca44498..c915acb96a6 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -112,8 +112,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.6.4" - jackson_databind_version = "2.6.4" + jackson_version = "2.9.10" + jackson_databind_version = "2.9.10" jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/samples/client/petstore/java/jersey1/docs/ClassModel.md b/samples/client/petstore/java/jersey1/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/jersey1/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey1/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey1/docs/Model200Response.md b/samples/client/petstore/java/jersey1/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/jersey1/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey1/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey1/docs/ModelReturn.md b/samples/client/petstore/java/jersey1/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/jersey1/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey1/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey1/docs/Name.md b/samples/client/petstore/java/jersey1/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/jersey1/docs/Name.md +++ b/samples/client/petstore/java/jersey1/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiClient.java index eb192de803b..c07b4ad77e2 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiClient.java @@ -30,6 +30,7 @@ import com.sun.jersey.api.client.WebResource.Builder; import com.sun.jersey.multipart.FormDataMultiPart; import com.sun.jersey.multipart.file.FileDataBodyPart; +import javax.ws.rs.core.Cookie; import javax.ws.rs.core.Response.Status.Family; import javax.ws.rs.core.MediaType; @@ -59,6 +60,7 @@ import org.openapitools.client.auth.OAuth; public class ApiClient { private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String basePath = "http://petstore.swagger.io:80/v2"; private boolean debugging = false; private int connectionTimeout = 0; @@ -230,7 +232,7 @@ public class ApiClient { /** * Helper method to set API key value for the first API key authentication. - * @param apiKey API key + * @param apiKey the API key */ public void setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { @@ -241,7 +243,7 @@ public class ApiClient { } throw new RuntimeException("No API key authentication configured!"); } - + /** * Helper method to set API key prefix for the first API key authentication. * @param apiKeyPrefix API key prefix @@ -307,6 +309,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is on @@ -641,12 +655,12 @@ public class ApiClient { return url.toString(); } - private ClientResponse getAPIResponse(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames) throws ApiException { + private ClientResponse getAPIResponse(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames) throws ApiException { if (body != null && !formParams.isEmpty()) { throw new ApiException(500, "Cannot have body and form params"); } - updateParamsForAuth(authNames, queryParams, headerParams); + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final String url = buildUrl(path, queryParams, collectionQueryParams); Builder builder; @@ -665,6 +679,15 @@ public class ApiClient { } } + for (Entry keyValue : cookieParams.entrySet()) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + for (Map.Entry keyValue : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(keyValue.getKey())) { + builder = builder.cookie(new Cookie(keyValue.getKey(), keyValue.getValue())); + } + } + ClientResponse response = null; if ("GET".equals(method)) { @@ -695,6 +718,7 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object - if it is not binary, otherwise null * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -703,9 +727,9 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public T invokeAPI(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + public T invokeAPI(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - ClientResponse response = getAPIResponse(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, accept, contentType, authNames); + ClientResponse response = getAPIResponse(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); statusCode = response.getStatusInfo().getStatusCode(); responseHeaders = response.getHeaders(); @@ -742,12 +766,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams Query parameters * @param headerParams Header parameters + * @param cookieParams Cookie parameters */ - private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 5c173c44e1e..abb57bf3dd3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -70,11 +70,13 @@ public class AnotherFakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -88,6 +90,6 @@ public class AnotherFakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java index c984d269bd7..0dd5834badf 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java @@ -77,11 +77,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -95,7 +97,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -114,11 +116,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -132,7 +136,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -151,11 +155,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -169,7 +175,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -188,11 +194,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -206,7 +214,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -225,11 +233,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -243,7 +253,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -266,11 +276,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -284,7 +296,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -313,12 +325,14 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPair("query", query)); + final String[] localVarAccepts = { }; @@ -332,7 +346,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test \"client\" model @@ -356,11 +370,13 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -374,7 +390,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -425,10 +441,12 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (integer != null) localVarFormParams.put("integer", integer); if (int32 != null) @@ -471,7 +489,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test enum parameters @@ -496,6 +514,7 @@ if (paramCallback != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); @@ -508,6 +527,7 @@ if (paramCallback != null) if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -526,7 +546,7 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Fake endpoint to test group parameters (optional) @@ -564,6 +584,7 @@ if (enumFormString != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPair("required_string_group", requiredStringGroup)); @@ -577,6 +598,7 @@ if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + final String[] localVarAccepts = { }; @@ -590,7 +612,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test inline additionalProperties @@ -613,11 +635,13 @@ if (booleanGroup != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -631,7 +655,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test json serialization of form data @@ -660,10 +684,12 @@ if (booleanGroup != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); if (param2 != null) @@ -682,7 +708,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -729,6 +755,7 @@ if (param2 != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); @@ -739,6 +766,7 @@ if (param2 != null) + final String[] localVarAccepts = { }; @@ -752,6 +780,6 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index ccf348a198b..62ad8734de3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -70,11 +70,13 @@ public class FakeClassnameTags123Api { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -88,6 +90,6 @@ public class FakeClassnameTags123Api { String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java index c98c6811e50..8480949a5ec 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java @@ -71,11 +71,13 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -89,7 +91,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes a pet @@ -114,6 +116,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -121,6 +124,7 @@ public class PetApi { localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; @@ -134,7 +138,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Finds Pets by status @@ -158,12 +162,14 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -177,7 +183,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Finds Pets by tags @@ -203,12 +209,14 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -222,7 +230,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find pet by ID @@ -247,11 +255,13 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -265,7 +275,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update an existing pet @@ -288,11 +298,13 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -306,7 +318,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updates a pet in the store with form data @@ -332,10 +344,12 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -354,7 +368,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * uploads an image @@ -381,10 +395,12 @@ if (status != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) @@ -403,7 +419,7 @@ if (file != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * uploads an image (required) @@ -435,10 +451,12 @@ if (file != null) List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -457,6 +475,6 @@ if (requiredFile != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java index beec31d3b99..52de03d9e75 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -70,11 +70,13 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -88,7 +90,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Returns pet inventories by status @@ -106,11 +108,13 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -124,7 +128,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find purchase order by ID @@ -149,11 +153,13 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -167,7 +173,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Place an order for a pet @@ -191,11 +197,13 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -209,6 +217,6 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java index 44dfadb8af8..7edacb17d72 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java @@ -69,11 +69,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -87,7 +89,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -110,11 +112,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -128,7 +132,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -151,11 +155,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -169,7 +175,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Delete user @@ -193,11 +199,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -211,7 +219,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Get user by user name @@ -236,11 +244,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -254,7 +264,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs user into the system @@ -284,6 +294,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPair("username", username)); @@ -291,6 +302,7 @@ public class UserApi { + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -304,7 +316,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs out current logged in user session @@ -321,11 +333,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -339,7 +353,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updated user @@ -369,11 +383,13 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -387,6 +403,6 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 35e28a5244a..98993417bee 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -44,7 +44,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java index dabd18a06a1..6e281630216 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c9bb8bcebec..73f39358794 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 32a4d8bb6e4..e3daa1a3e1c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java index 75b1edce8d9..f585a625223 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index d9b17065f7c..02f5da4c221 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -15,33 +15,57 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); + assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index 668342d96d7..458e73e8a7e 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -22,13 +22,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -36,7 +38,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +46,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); diff --git a/samples/client/petstore/java/jersey2-java6/build.sbt b/samples/client/petstore/java/jersey2-java6/build.sbt index 3e8fa656473..c79af88c587 100644 --- a/samples/client/petstore/java/jersey2-java6/build.sbt +++ b/samples/client/petstore/java/jersey2-java6/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", "org.apache.commons" % "commons-lang3" % "3.6", "commons-io" % "commons-io" % "2.5", diff --git a/samples/client/petstore/java/jersey2-java6/docs/ClassModel.md b/samples/client/petstore/java/jersey2-java6/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey2-java6/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java6/docs/Model200Response.md b/samples/client/petstore/java/jersey2-java6/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey2-java6/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java6/docs/ModelReturn.md b/samples/client/petstore/java/jersey2-java6/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey2-java6/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java6/docs/Name.md b/samples/client/petstore/java/jersey2-java6/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java6/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index a23046886f2..19754477d9d 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -293,7 +293,7 @@ 2.9.10 2.9.10 0.2.0 - 2.6.4 + 2.9.10 1.0.0 4.12 diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java index 3ac9d1688ce..07915c2fafe 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java @@ -53,6 +53,7 @@ import org.openapitools.client.auth.OAuth; public class ApiClient { protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); protected String basePath = "http://petstore.swagger.io:80/v2"; protected boolean debugging = false; protected int connectionTimeout = 0; @@ -235,6 +236,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is switched on @@ -305,7 +318,7 @@ public class ApiClient { public int getReadTimeout() { return readTimeout; } - + /** * Set the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and @@ -646,6 +659,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -654,8 +668,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -678,6 +692,13 @@ public class ApiClient { } } + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + for (Entry entry : defaultHeaderMap.entrySet()) { String key = entry.getKey(); if (!headerParams.containsKey(key)) { @@ -795,12 +816,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 227f00969d0..9d0776bb227 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -77,11 +77,13 @@ public class AnotherFakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class AnotherFakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index 267830f13ed..c9d99435afa 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -85,11 +85,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -103,7 +105,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -142,11 +144,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -160,7 +164,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -199,11 +203,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -217,7 +223,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -256,11 +262,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -274,7 +282,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -313,11 +321,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -331,7 +341,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -375,11 +385,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -393,7 +405,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -444,12 +456,14 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + final String[] localVarAccepts = { }; @@ -463,7 +477,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test \"client\" model @@ -507,11 +521,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -525,7 +541,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -612,10 +628,12 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (integer != null) localVarFormParams.put("integer", integer); if (int32 != null) @@ -658,7 +676,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test enum parameters @@ -713,6 +731,7 @@ if (paramCallback != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); @@ -725,6 +744,7 @@ if (paramCallback != null) if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -743,7 +763,7 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Fake endpoint to test group parameters (optional) @@ -807,6 +827,7 @@ if (enumFormString != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); @@ -820,6 +841,7 @@ if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + final String[] localVarAccepts = { }; @@ -833,7 +855,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test inline additionalProperties @@ -877,11 +899,13 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -895,7 +919,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test json serialization of form data @@ -946,10 +970,12 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); if (param2 != null) @@ -968,7 +994,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -1040,6 +1066,7 @@ if (param2 != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); @@ -1050,6 +1077,7 @@ if (param2 != null) + final String[] localVarAccepts = { }; @@ -1063,6 +1091,6 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 1d2ba11a21d..e4f033f2a10 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -77,11 +77,13 @@ public class FakeClassnameTags123Api { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class FakeClassnameTags123Api { String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index 9e59435a5f1..11467f78a10 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -81,11 +81,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -99,7 +101,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes a pet @@ -148,6 +150,7 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -155,6 +158,7 @@ public class PetApi { localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; @@ -168,7 +172,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Finds Pets by status @@ -214,12 +218,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -233,7 +239,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Finds Pets by tags @@ -283,12 +289,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -302,7 +310,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find pet by ID @@ -351,11 +359,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -369,7 +379,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update an existing pet @@ -419,11 +429,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -437,7 +449,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updates a pet in the store with form data @@ -486,10 +498,12 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -508,7 +522,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * uploads an image @@ -557,10 +571,12 @@ if (status != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) @@ -579,7 +595,7 @@ if (file != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * uploads an image (required) @@ -633,10 +649,12 @@ if (file != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -655,6 +673,6 @@ if (requiredFile != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java index 5093a9d4116..42734da7a61 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java @@ -80,11 +80,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -98,7 +100,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Returns pet inventories by status @@ -135,11 +137,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -153,7 +157,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find purchase order by ID @@ -202,11 +206,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -220,7 +226,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Place an order for a pet @@ -266,11 +272,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -284,6 +292,6 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java index 78b37fbceab..ab4ae8c089f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java @@ -77,11 +77,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -95,7 +97,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -139,11 +141,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -157,7 +161,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -201,11 +205,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -219,7 +225,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Delete user @@ -266,11 +272,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -284,7 +292,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Get user by user name @@ -333,11 +341,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -351,7 +361,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs user into the system @@ -404,6 +414,7 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -411,6 +422,7 @@ public class UserApi { + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -424,7 +436,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs out current logged in user session @@ -461,11 +473,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -479,7 +493,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updated user @@ -533,11 +547,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -551,6 +567,6 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 35e28a5244a..98993417bee 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -44,7 +44,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 70bde457ccb..918a8b6f4c4 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -56,7 +56,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 0faa25399f2..2d38423da84 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0ea3a88551b..441c2debd6d 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -56,7 +56,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index ddec5a7634b..0ea54fca637 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -106,7 +106,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -140,7 +139,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -174,7 +172,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -208,7 +205,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -242,7 +238,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -276,7 +271,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -310,7 +304,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -344,7 +337,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -370,7 +362,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -396,7 +387,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -422,7 +412,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 64836ad8d0e..a50b957d7f8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -56,7 +56,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 191fee93963..99e5a1fd46e 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 54eec28ca31..71181f480a2 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -56,7 +56,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b8195860f1..508930ed85f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -56,7 +56,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java index 32f9232bd15..cb94f281e85 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java @@ -65,7 +65,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -91,7 +90,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index d026e797b75..c658c3bf2f5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -65,7 +65,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 2f7d61a00c9..fdbd4c8a7e3 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -65,7 +65,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java index 32d960da78c..6586d6dc22a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -73,7 +73,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -107,7 +106,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -141,7 +139,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java index 947f2eb7822..96b00573c11 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java @@ -74,7 +74,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -100,7 +99,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -126,7 +124,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -152,7 +149,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -178,7 +174,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -204,7 +199,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java index 9643935a3df..fc9c8c08e80 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java @@ -56,7 +56,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java index 4e8b2a07a1f..464bca0a4b5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -54,7 +54,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java index 36430e915a9..62392f4cda8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java @@ -58,7 +58,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -83,7 +82,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java index 6108498d4b0..2cb98e618e9 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java @@ -55,7 +55,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java index 126f9fa5e95..f2a426f5eb5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java @@ -54,7 +54,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java index 259243417ef..89e231aa7c9 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java @@ -56,7 +56,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java index a83c0c8f534..bca1adcdc9a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -54,7 +54,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java index 6c7e9898226..5e356ba76d3 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -130,7 +130,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -164,7 +163,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java index 6a0fd85bb68..86855d1b366 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java @@ -215,7 +215,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -240,7 +239,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -266,7 +264,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -292,7 +289,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -318,7 +314,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index cefda17732f..f3d7af41c1d 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -60,7 +60,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -94,7 +93,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java index 427c603328b..4271a12ec47 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java @@ -113,7 +113,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -141,7 +140,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -167,7 +165,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -194,7 +191,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -222,7 +218,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -250,7 +245,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -276,7 +270,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -301,7 +294,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -327,7 +319,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -352,7 +343,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -378,7 +368,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -404,7 +393,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -429,7 +417,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -455,7 +442,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java index 74d3dd14f27..f1189185b71 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java @@ -112,7 +112,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -146,7 +145,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -180,7 +178,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -214,7 +211,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 4af92dc91df..2847bfdf4e0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -68,7 +68,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -94,7 +93,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -128,7 +126,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java index 2416c1eb279..5c058250621 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java @@ -59,7 +59,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -85,7 +84,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java index bfe12319eb9..65792b1c28d 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -62,7 +62,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -88,7 +87,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -114,7 +112,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java index cc33376f845..7f1c7276402 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -55,7 +55,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java index 497338ea91b..dc57304848a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java @@ -66,7 +66,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -108,7 +107,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java index 75539a6ba18..84f061a152b 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -55,7 +55,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java index fee7b19880f..650d83943ca 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java @@ -112,7 +112,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -138,7 +137,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -164,7 +162,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -190,7 +187,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -216,7 +212,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java index 4f695eb6e10..c419a4fee2c 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -63,7 +63,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -89,7 +88,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -115,7 +113,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java index 5974b1c014d..ab2be8bc687 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java @@ -115,7 +115,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -141,7 +140,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -166,7 +164,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -196,7 +193,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -230,7 +226,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index e3cff629be4..b6a7acbe57e 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -74,7 +74,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java index 296938f2632..e1f4594db34 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -54,7 +54,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java index 40249f40314..0119bf5e1e5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java @@ -58,7 +58,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 9e406ce6c7d..8dc23d60797 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -72,7 +72,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -122,7 +120,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -147,7 +144,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -177,7 +173,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderExample.java index e4973ba1f49..99e070c47ed 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -76,7 +76,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -101,7 +100,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -126,7 +124,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -151,7 +148,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -176,7 +172,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -206,7 +201,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java index e11486610c3..6524d25cb78 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java @@ -82,7 +82,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -108,7 +107,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -134,7 +132,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -160,7 +157,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -186,7 +182,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -212,7 +207,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -238,7 +232,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -264,7 +257,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java index 3a1fd9f0b46..6268bb6245f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java @@ -169,7 +169,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -195,7 +194,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -221,7 +219,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -247,7 +244,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -281,7 +277,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -307,7 +302,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -333,7 +327,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -359,7 +352,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -385,7 +377,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -419,7 +410,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -453,7 +443,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -479,7 +468,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -505,7 +493,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -531,7 +518,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -557,7 +543,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -591,7 +576,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -625,7 +609,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -651,7 +634,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -677,7 +659,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -703,7 +684,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -729,7 +709,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -763,7 +742,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -797,7 +775,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -823,7 +800,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -849,7 +825,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -875,7 +850,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -901,7 +875,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -935,7 +908,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -969,7 +941,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt index 8fcc9ffc1d2..b07ce9ccc08 100644 --- a/samples/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/client/petstore/java/jersey2-java8/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.9" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md b/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md b/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md b/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey2-java8/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java8/docs/Name.md b/samples/client/petstore/java/jersey2-java8/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/Name.md +++ b/samples/client/petstore/java/jersey2-java8/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index a06ca6f8d63..8fa20fb9795 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -54,6 +54,7 @@ import org.openapitools.client.auth.OAuth; public class ApiClient { protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); protected String basePath = "http://petstore.swagger.io:80/v2"; protected boolean debugging = false; protected int connectionTimeout = 0; @@ -236,6 +237,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is switched on @@ -306,7 +319,7 @@ public class ApiClient { public int getReadTimeout() { return readTimeout; } - + /** * Set the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and @@ -646,6 +659,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -654,8 +668,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -678,6 +692,13 @@ public class ApiClient { } } + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + for (Entry entry : defaultHeaderMap.entrySet()) { String key = entry.getKey(); if (!headerParams.containsKey(key)) { @@ -798,12 +819,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 227f00969d0..9d0776bb227 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -77,11 +77,13 @@ public class AnotherFakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class AnotherFakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 8324e74ea04..e2351eb861b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -85,11 +85,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -103,7 +105,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -142,11 +144,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -160,7 +164,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -199,11 +203,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -217,7 +223,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -256,11 +262,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -274,7 +282,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -313,11 +321,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -331,7 +341,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -375,11 +385,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -393,7 +405,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -444,12 +456,14 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + final String[] localVarAccepts = { }; @@ -463,7 +477,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test \"client\" model @@ -507,11 +521,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -525,7 +541,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -612,10 +628,12 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (integer != null) localVarFormParams.put("integer", integer); if (int32 != null) @@ -658,7 +676,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test enum parameters @@ -713,6 +731,7 @@ if (paramCallback != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); @@ -725,6 +744,7 @@ if (paramCallback != null) if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -743,7 +763,7 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Fake endpoint to test group parameters (optional) @@ -807,6 +827,7 @@ if (enumFormString != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); @@ -820,6 +841,7 @@ if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + final String[] localVarAccepts = { }; @@ -833,7 +855,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test inline additionalProperties @@ -877,11 +899,13 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -895,7 +919,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test json serialization of form data @@ -946,10 +970,12 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); if (param2 != null) @@ -968,7 +994,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -1040,6 +1066,7 @@ if (param2 != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); @@ -1050,6 +1077,7 @@ if (param2 != null) + final String[] localVarAccepts = { }; @@ -1063,6 +1091,6 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 1d2ba11a21d..e4f033f2a10 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -77,11 +77,13 @@ public class FakeClassnameTags123Api { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class FakeClassnameTags123Api { String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index 9e59435a5f1..11467f78a10 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -81,11 +81,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -99,7 +101,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes a pet @@ -148,6 +150,7 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -155,6 +158,7 @@ public class PetApi { localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; @@ -168,7 +172,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Finds Pets by status @@ -214,12 +218,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -233,7 +239,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Finds Pets by tags @@ -283,12 +289,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -302,7 +310,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find pet by ID @@ -351,11 +359,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -369,7 +379,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update an existing pet @@ -419,11 +429,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -437,7 +449,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updates a pet in the store with form data @@ -486,10 +498,12 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -508,7 +522,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * uploads an image @@ -557,10 +571,12 @@ if (status != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) @@ -579,7 +595,7 @@ if (file != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * uploads an image (required) @@ -633,10 +649,12 @@ if (file != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -655,6 +673,6 @@ if (requiredFile != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 5093a9d4116..42734da7a61 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -80,11 +80,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -98,7 +100,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Returns pet inventories by status @@ -135,11 +137,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -153,7 +157,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find purchase order by ID @@ -202,11 +206,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -220,7 +226,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Place an order for a pet @@ -266,11 +272,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -284,6 +292,6 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index 78b37fbceab..ab4ae8c089f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -77,11 +77,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -95,7 +97,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -139,11 +141,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -157,7 +161,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -201,11 +205,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -219,7 +225,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Delete user @@ -266,11 +272,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -284,7 +292,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Get user by user name @@ -333,11 +341,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -351,7 +361,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs user into the system @@ -404,6 +414,7 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -411,6 +422,7 @@ public class UserApi { + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -424,7 +436,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs out current logged in user session @@ -461,11 +473,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -479,7 +493,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updated user @@ -533,11 +547,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -551,6 +567,6 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index f4671cb922d..b0ddd9436e8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -44,7 +44,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0b590e6f976..fa85ab77596 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 42cb666ee58..28d19953c34 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 183ed21ce31..5eeac9d8ac5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java index d18e80986aa..df57098053e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java index 16d4f8bc2ff..86526adb3fa 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8d9d9801c23..cfd62fbce62 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java index ac8809b98d9..72ed8740e4d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java index 3f48b4f8a06..3e72350aa8b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 11037877807..07d314691a9 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java index ffea4083f90..ba4e395e94e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java index 30bd83db599..2df466732f7 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 85e9389c1ee..f79d7b6383a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 158636a401f..f15b107fd18 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java index da87f2d6830..b3fbdce31b9 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index d9b17065f7c..2122bf1dbd8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -15,33 +15,55 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index 668342d96d7..caca03ba11b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -22,10 +22,11 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); @@ -36,7 +37,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +45,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index c94a36a9fa2..d46e3b0a8b1 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -100,7 +100,7 @@ ext { jackson_databind_nullable_version = "0.2.0" jersey_version = "2.27" junit_version = "4.12" - threetenbp_version = "2.6.4" + threetenbp_version = "2.9.10" } dependencies { diff --git a/samples/client/petstore/java/jersey2/build.sbt b/samples/client/petstore/java/jersey2/build.sbt index 35031940ba2..20b9bf85680 100644 --- a/samples/client/petstore/java/jersey2/build.sbt +++ b/samples/client/petstore/java/jersey2/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/samples/client/petstore/java/jersey2/docs/ClassModel.md b/samples/client/petstore/java/jersey2/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/jersey2/docs/ClassModel.md +++ b/samples/client/petstore/java/jersey2/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2/docs/Model200Response.md b/samples/client/petstore/java/jersey2/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/jersey2/docs/Model200Response.md +++ b/samples/client/petstore/java/jersey2/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2/docs/ModelReturn.md b/samples/client/petstore/java/jersey2/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/jersey2/docs/ModelReturn.md +++ b/samples/client/petstore/java/jersey2/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2/docs/Name.md b/samples/client/petstore/java/jersey2/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/jersey2/docs/Name.md +++ b/samples/client/petstore/java/jersey2/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index 33a470f9386..6770d11afa6 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -286,7 +286,7 @@ 2.9.10 2.9.10 0.2.0 - 2.6.4 + 2.9.10 1.0.0 4.12 diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java index a06ca6f8d63..8fa20fb9795 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java @@ -54,6 +54,7 @@ import org.openapitools.client.auth.OAuth; public class ApiClient { protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); protected String basePath = "http://petstore.swagger.io:80/v2"; protected boolean debugging = false; protected int connectionTimeout = 0; @@ -236,6 +237,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @return True if debugging is switched on @@ -306,7 +319,7 @@ public class ApiClient { public int getReadTimeout() { return readTimeout; } - + /** * Set the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and @@ -646,6 +659,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -654,8 +668,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException API exception */ - public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -678,6 +692,13 @@ public class ApiClient { } } + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + for (Entry entry : defaultHeaderMap.entrySet()) { String key = entry.getKey(); if (!headerParams.containsKey(key)) { @@ -798,12 +819,13 @@ public class ApiClient { * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 227f00969d0..9d0776bb227 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -77,11 +77,13 @@ public class AnotherFakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class AnotherFakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index 267830f13ed..c9d99435afa 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -85,11 +85,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -103,7 +105,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -142,11 +144,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -160,7 +164,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -199,11 +203,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -217,7 +223,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -256,11 +262,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -274,7 +282,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -313,11 +321,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -331,7 +341,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -375,11 +385,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -393,7 +405,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -444,12 +456,14 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + final String[] localVarAccepts = { }; @@ -463,7 +477,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test \"client\" model @@ -507,11 +521,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -525,7 +541,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -612,10 +628,12 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (integer != null) localVarFormParams.put("integer", integer); if (int32 != null) @@ -658,7 +676,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test enum parameters @@ -713,6 +731,7 @@ if (paramCallback != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); @@ -725,6 +744,7 @@ if (paramCallback != null) if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -743,7 +763,7 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Fake endpoint to test group parameters (optional) @@ -807,6 +827,7 @@ if (enumFormString != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); @@ -820,6 +841,7 @@ if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + final String[] localVarAccepts = { }; @@ -833,7 +855,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test inline additionalProperties @@ -877,11 +899,13 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -895,7 +919,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test json serialization of form data @@ -946,10 +970,12 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); if (param2 != null) @@ -968,7 +994,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -1040,6 +1066,7 @@ if (param2 != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); @@ -1050,6 +1077,7 @@ if (param2 != null) + final String[] localVarAccepts = { }; @@ -1063,6 +1091,6 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 1d2ba11a21d..e4f033f2a10 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -77,11 +77,13 @@ public class FakeClassnameTags123Api { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -95,6 +97,6 @@ public class FakeClassnameTags123Api { String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index 9e59435a5f1..11467f78a10 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -81,11 +81,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -99,7 +101,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes a pet @@ -148,6 +150,7 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -155,6 +158,7 @@ public class PetApi { localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; @@ -168,7 +172,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Finds Pets by status @@ -214,12 +218,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -233,7 +239,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Finds Pets by tags @@ -283,12 +289,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -302,7 +310,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find pet by ID @@ -351,11 +359,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -369,7 +379,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update an existing pet @@ -419,11 +429,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -437,7 +449,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updates a pet in the store with form data @@ -486,10 +498,12 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -508,7 +522,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * uploads an image @@ -557,10 +571,12 @@ if (status != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) @@ -579,7 +595,7 @@ if (file != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * uploads an image (required) @@ -633,10 +649,12 @@ if (file != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -655,6 +673,6 @@ if (requiredFile != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java index 5093a9d4116..42734da7a61 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -80,11 +80,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -98,7 +100,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Returns pet inventories by status @@ -135,11 +137,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -153,7 +157,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find purchase order by ID @@ -202,11 +206,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -220,7 +226,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Place an order for a pet @@ -266,11 +272,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -284,6 +292,6 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java index 78b37fbceab..ab4ae8c089f 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java @@ -77,11 +77,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -95,7 +97,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -139,11 +141,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -157,7 +161,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -201,11 +205,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -219,7 +225,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Delete user @@ -266,11 +272,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -284,7 +292,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Get user by user name @@ -333,11 +341,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -351,7 +361,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs user into the system @@ -404,6 +414,7 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -411,6 +422,7 @@ public class UserApi { + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -424,7 +436,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs out current logged in user session @@ -461,11 +473,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -479,7 +493,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updated user @@ -533,11 +547,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -551,6 +567,6 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 35e28a5244a..98993417bee 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -44,7 +44,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java index dabd18a06a1..6e281630216 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c9bb8bcebec..73f39358794 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 32a4d8bb6e4..e3daa1a3e1c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java index 75b1edce8d9..f585a625223 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index d9b17065f7c..2122bf1dbd8 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -15,33 +15,55 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index 668342d96d7..caca03ba11b 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -22,10 +22,11 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to query parameters assertEquals(0, queryParams.size()); @@ -36,7 +37,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +45,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); diff --git a/samples/client/petstore/java/native/docs/ClassModel.md b/samples/client/petstore/java/native/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/native/docs/ClassModel.md +++ b/samples/client/petstore/java/native/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/native/docs/Model200Response.md b/samples/client/petstore/java/native/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/native/docs/Model200Response.md +++ b/samples/client/petstore/java/native/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/native/docs/ModelReturn.md b/samples/client/petstore/java/native/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/native/docs/ModelReturn.md +++ b/samples/client/petstore/java/native/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/native/docs/Name.md b/samples/client/petstore/java/native/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/native/docs/Name.md +++ b/samples/client/petstore/java/native/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0b590e6f976..fa85ab77596 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 42cb666ee58..28d19953c34 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 183ed21ce31..5eeac9d8ac5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java index d18e80986aa..df57098053e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java index 16d4f8bc2ff..86526adb3fa 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8d9d9801c23..cfd62fbce62 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java index ac8809b98d9..72ed8740e4d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java index 3f48b4f8a06..3e72350aa8b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 11037877807..07d314691a9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java index ffea4083f90..ba4e395e94e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java index 30bd83db599..2df466732f7 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 85e9389c1ee..f79d7b6383a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 158636a401f..f15b107fd18 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/XmlItem.java index da87f2d6830..b3fbdce31b9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 3093757fe3b..30ce39baba4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -106,7 +106,7 @@ dependencies { compile 'io.gsonfire:gson-fire:1.8.3' compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' - compile 'org.threeten:threetenbp:1.3.5' + compile 'org.threeten:threetenbp:1.4.0' testCompile 'junit:junit:4.12' } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index 626e3702520..af7c30f1de0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "com.google.code.gson" % "gson" % "2.8.5", "org.apache.commons" % "commons-lang3" % "3.9", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 40b0cc6b2a9..d39a18c5213 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -270,7 +270,7 @@ 3.14.2 2.8.5 3.9 - 1.3.8 + 1.4.0 1.0.0 1.0 4.12 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java index 42fc1fa212a..843e662b781 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java @@ -15,6 +15,7 @@ package org.openapitools.client; import okhttp3.*; import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; import okio.BufferedSink; @@ -60,6 +61,7 @@ public class ApiClient { private String basePath = "http://petstore.swagger.io:80/v2"; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String tempFolderPath = null; private Map authentications; @@ -409,6 +411,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @@ -1034,14 +1048,15 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, callback); + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1055,18 +1070,20 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); String contentType = (String) headerParams.get("Content-Type"); // ensuring a default content type @@ -1161,8 +1178,8 @@ public class ApiClient { /** * Set header parameters to the request builder, including default headers. * - * @param headerParams Header parameters in the ofrm of Map - * @param reqBuilder Reqeust.Builder + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder */ public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { for (Entry param : headerParams.entrySet()) { @@ -1175,20 +1192,38 @@ public class ApiClient { } } + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } @@ -1271,8 +1306,8 @@ public class ApiClient { */ private void applySslSettings() { try { - TrustManager[] trustManagers = null; - HostnameVerifier hostnameVerifier = null; + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; if (!verifyingSsl) { trustManagers = new TrustManager[]{ new X509TrustManager() { @@ -1290,40 +1325,42 @@ public class ApiClient { } } }; - SSLContext sslContext = SSLContext.getInstance("TLS"); hostnameVerifier = new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }; - } else if (sslCaCert != null) { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - trustManagerFactory.init(caKeyStore); - trustManagers = trustManagerFactory.getTrustManagers(); - } - - if (keyManagers != null || trustManagers != null) { - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]).build(); } else { - httpClient = httpClient.newBuilder().sslSocketFactory(null, (X509TrustManager) trustManagers[0]).build(); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; } - httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build(); + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index c9978a6f869..7dc96ac1afb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -75,6 +75,7 @@ public class AnotherFakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -91,7 +92,7 @@ public class AnotherFakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index c070ab31835..ac29cdbe1e1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -83,6 +83,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -99,7 +100,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -188,6 +189,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -204,7 +206,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -292,6 +294,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -308,7 +311,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -396,6 +399,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -412,7 +416,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -500,6 +504,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -516,7 +521,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -604,6 +609,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -620,7 +626,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -714,6 +720,7 @@ public class FakeApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -730,7 +737,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -827,6 +834,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -843,7 +851,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -950,6 +958,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (integer != null) { localVarFormParams.put("integer", integer); @@ -1022,7 +1031,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "http_basic_test" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1200,6 +1209,7 @@ public class FakeApi { localVarHeaderParams.put("enum_header_string", localVarApiClient.parameterToString(enumHeaderString)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (enumFormStringArray != null) { localVarFormParams.put("enum_form_string_array", enumFormStringArray); @@ -1224,7 +1234,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1344,6 +1354,7 @@ public class FakeApi { localVarHeaderParams.put("boolean_group", localVarApiClient.parameterToString(booleanGroup)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1360,7 +1371,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1539,6 +1550,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1555,7 +1567,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1645,6 +1657,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (param != null) { localVarFormParams.put("param", param); @@ -1669,7 +1682,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1790,6 +1803,7 @@ public class FakeApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1806,7 +1820,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 621c27fd295..fe3f9926447 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -75,6 +75,7 @@ public class FakeClassnameTags123Api { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -91,7 +92,7 @@ public class FakeClassnameTags123Api { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key_query" }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index c0c72236815..18c2941546d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -78,6 +78,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -94,7 +95,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -193,6 +194,7 @@ public class PetApi { localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -209,7 +211,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -309,6 +311,7 @@ public class PetApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -325,7 +328,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -428,6 +431,7 @@ public class PetApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -444,7 +448,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @@ -550,6 +554,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -566,7 +571,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -668,6 +673,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -684,7 +690,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -785,6 +791,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (name != null) { localVarFormParams.put("name", name); @@ -809,7 +816,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -907,6 +914,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (additionalMetadata != null) { localVarFormParams.put("additionalMetadata", additionalMetadata); @@ -931,7 +939,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1033,6 +1041,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (additionalMetadata != null) { localVarFormParams.put("additionalMetadata", additionalMetadata); @@ -1057,7 +1066,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index 748ae2e8c0a..a75ea2ae48f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -77,6 +77,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -93,7 +94,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -184,6 +185,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -200,7 +202,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -288,6 +290,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -304,7 +307,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -404,6 +407,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -420,7 +424,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index d96b89b607c..567006c4740 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -75,6 +75,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -91,7 +92,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -180,6 +181,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -196,7 +198,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -285,6 +287,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -301,7 +304,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -392,6 +395,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -408,7 +412,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -503,6 +507,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -519,7 +524,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -628,6 +633,7 @@ public class UserApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -644,7 +650,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -747,6 +753,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -763,7 +770,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -847,6 +854,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -863,7 +871,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 427a130a2d0..959a3211653 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -43,7 +43,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/RetryingOAuth.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/RetryingOAuth.java index 7022c5c8c9e..965351d0635 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/RetryingOAuth.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/RetryingOAuth.java @@ -168,7 +168,7 @@ public class RetryingOAuth extends OAuth implements Interceptor { // Applying authorization to parameters is performed in the retryingIntercept method @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { // No implementation necessary } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 046018a4bf9..799f4f29919 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesAnyType extends HashMap impleme } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8f440fc6bf7..3a4f7f53407 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesArray extends HashMap implements } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 19d55e0f009..8c12d0836db 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesBoolean extends HashMap implem } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e1edb91edde..4935e553356 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -108,7 +108,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -140,7 +139,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -172,7 +170,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -204,7 +201,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -236,7 +232,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -268,7 +263,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -300,7 +294,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -332,7 +325,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -356,7 +348,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -380,7 +371,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -404,7 +394,6 @@ public class AdditionalPropertiesClass implements Parcelable { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 17e9e9d1913..815a9c69827 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesInteger extends HashMap implem } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 6cbb3aa9684..d73cfe4f44b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesNumber extends HashMap impl } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 9f14ff2bde0..14736d319ab 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesObject extends HashMap implements } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index c24a17f9080..c10de0fa03d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesString extends HashMap implemen } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java index 0d24289a3c0..1367d6dd788 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java @@ -61,7 +61,6 @@ public class Animal implements Parcelable { } - public void setClassName(String className) { this.className = className; } @@ -85,7 +84,6 @@ public class Animal implements Parcelable { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 088c12706d1..3237410a4e6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -67,7 +67,6 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 1f5bf615e5d..3c66930c874 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -67,7 +67,6 @@ public class ArrayOfNumberOnly implements Parcelable { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java index 1f2fde0c7ef..e5b6e8595ec 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -75,7 +75,6 @@ public class ArrayTest implements Parcelable { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -107,7 +106,6 @@ public class ArrayTest implements Parcelable { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -139,7 +137,6 @@ public class ArrayTest implements Parcelable { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java index f9ddbf936dd..2caf50a6a0b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java @@ -76,7 +76,6 @@ public class Capitalization implements Parcelable { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -100,7 +99,6 @@ public class Capitalization implements Parcelable { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -124,7 +122,6 @@ public class Capitalization implements Parcelable { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -148,7 +145,6 @@ public class Capitalization implements Parcelable { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -172,7 +168,6 @@ public class Capitalization implements Parcelable { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -196,7 +191,6 @@ public class Capitalization implements Parcelable { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java index 2f96f6fdb6a..222a31778b5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java @@ -59,7 +59,6 @@ public class Cat extends Animal implements Parcelable { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java index 93b3fbb0c66..90ebd33eb90 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -56,7 +56,6 @@ public class CatAllOf implements Parcelable { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java index 1cd35b954bd..7341142e952 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java @@ -60,7 +60,6 @@ public class Category implements Parcelable { } - public void setId(Long id) { this.id = id; } @@ -83,7 +82,6 @@ public class Category implements Parcelable { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java index 9ec7a3c8cff..1d174752b7a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java @@ -57,7 +57,6 @@ public class ClassModel implements Parcelable { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java index 4e9c9ebc3e4..431d2646474 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java @@ -56,7 +56,6 @@ public class Client implements Parcelable { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java index c420287ab42..8b4f6c687ff 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java @@ -59,7 +59,6 @@ public class Dog extends Animal implements Parcelable { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java index 38d0356fd20..52fe8632402 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -56,7 +56,6 @@ public class DogAllOf implements Parcelable { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java index caa59c3a6ea..f3b128fd139 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -156,7 +156,6 @@ public class EnumArrays implements Parcelable { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -188,7 +187,6 @@ public class EnumArrays implements Parcelable { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java index 383b85c790b..8fb43919154 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java @@ -265,7 +265,6 @@ public class EnumTest implements Parcelable { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -288,7 +287,6 @@ public class EnumTest implements Parcelable { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -312,7 +310,6 @@ public class EnumTest implements Parcelable { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -336,7 +333,6 @@ public class EnumTest implements Parcelable { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -360,7 +356,6 @@ public class EnumTest implements Parcelable { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 1222b62971e..7f37b4693f9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -62,7 +62,6 @@ public class FileSchemaTestClass implements Parcelable { } - public void setFile(java.io.File file) { this.file = file; } @@ -94,7 +93,6 @@ public class FileSchemaTestClass implements Parcelable { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java index 7efea2c8575..c83b12623e9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java @@ -115,7 +115,6 @@ public class FormatTest implements Parcelable { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -141,7 +140,6 @@ public class FormatTest implements Parcelable { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -165,7 +163,6 @@ public class FormatTest implements Parcelable { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -190,7 +187,6 @@ public class FormatTest implements Parcelable { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -216,7 +212,6 @@ public class FormatTest implements Parcelable { } - public void setFloat(Float _float) { this._float = _float; } @@ -242,7 +237,6 @@ public class FormatTest implements Parcelable { } - public void setDouble(Double _double) { this._double = _double; } @@ -266,7 +260,6 @@ public class FormatTest implements Parcelable { } - public void setString(String string) { this.string = string; } @@ -289,7 +282,6 @@ public class FormatTest implements Parcelable { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -313,7 +305,6 @@ public class FormatTest implements Parcelable { } - public void setBinary(File binary) { this.binary = binary; } @@ -336,7 +327,6 @@ public class FormatTest implements Parcelable { } - public void setDate(LocalDate date) { this.date = date; } @@ -360,7 +350,6 @@ public class FormatTest implements Parcelable { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -384,7 +373,6 @@ public class FormatTest implements Parcelable { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -407,7 +395,6 @@ public class FormatTest implements Parcelable { } - public void setPassword(String password) { this.password = password; } @@ -431,7 +418,6 @@ public class FormatTest implements Parcelable { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index aaf07f81ced..a7f7e92e23b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -126,7 +126,6 @@ public class MapTest implements Parcelable { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -158,7 +157,6 @@ public class MapTest implements Parcelable { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -190,7 +188,6 @@ public class MapTest implements Parcelable { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -222,7 +219,6 @@ public class MapTest implements Parcelable { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 1d281317c58..a4e55b7778d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -70,7 +70,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -94,7 +93,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -126,7 +124,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java index 53389691bd6..ce610fd1e66 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java @@ -61,7 +61,6 @@ public class Model200Response implements Parcelable { } - public void setName(Integer name) { this.name = name; } @@ -85,7 +84,6 @@ public class Model200Response implements Parcelable { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java index fe455189509..c3f8d98fcdd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -64,7 +64,6 @@ public class ModelApiResponse implements Parcelable { } - public void setCode(Integer code) { this.code = code; } @@ -88,7 +87,6 @@ public class ModelApiResponse implements Parcelable { } - public void setType(String type) { this.type = type; } @@ -112,7 +110,6 @@ public class ModelApiResponse implements Parcelable { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java index 2f84315ce28..6ee19d9bef8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -57,7 +57,6 @@ public class ModelReturn implements Parcelable { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java index d3169dfa67e..442cbb10ee1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java @@ -68,7 +68,6 @@ public class Name implements Parcelable { } - public void setName(Integer name) { this.name = name; } @@ -106,7 +105,6 @@ public class Name implements Parcelable { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java index 932fb9fb8d6..4544fcf3a15 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -57,7 +57,6 @@ public class NumberOnly implements Parcelable { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java index 2e1e1968340..1c970568b06 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java @@ -126,7 +126,6 @@ public class Order implements Parcelable { } - public void setId(Long id) { this.id = id; } @@ -150,7 +149,6 @@ public class Order implements Parcelable { } - public void setPetId(Long petId) { this.petId = petId; } @@ -174,7 +172,6 @@ public class Order implements Parcelable { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -198,7 +195,6 @@ public class Order implements Parcelable { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -222,7 +218,6 @@ public class Order implements Parcelable { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -246,7 +241,6 @@ public class Order implements Parcelable { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index 8a13eb0902a..524143206b9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -65,7 +65,6 @@ public class OuterComposite implements Parcelable { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -89,7 +88,6 @@ public class OuterComposite implements Parcelable { } - public void setMyString(String myString) { this.myString = myString; } @@ -113,7 +111,6 @@ public class OuterComposite implements Parcelable { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java index f6fc8415a72..aba619a1c92 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java @@ -129,7 +129,6 @@ public class Pet implements Parcelable { } - public void setId(Long id) { this.id = id; } @@ -153,7 +152,6 @@ public class Pet implements Parcelable { } - public void setCategory(Category category) { this.category = category; } @@ -176,7 +174,6 @@ public class Pet implements Parcelable { } - public void setName(String name) { this.name = name; } @@ -204,7 +201,6 @@ public class Pet implements Parcelable { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -236,7 +232,6 @@ public class Pet implements Parcelable { } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +255,6 @@ public class Pet implements Parcelable { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 33b38146435..806d54baf97 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -74,7 +74,6 @@ public class ReadOnlyFirst implements Parcelable { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java index 006df157cc4..8ac528e97f2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -56,7 +56,6 @@ public class SpecialModelName implements Parcelable { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java index fa747cd4777..0ad73ddbe56 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java @@ -60,7 +60,6 @@ public class Tag implements Parcelable { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Tag implements Parcelable { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index cdfdf94ca93..02cc2745954 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -74,7 +74,6 @@ public class TypeHolderDefault implements Parcelable { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderDefault implements Parcelable { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderDefault implements Parcelable { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -143,7 +140,6 @@ public class TypeHolderDefault implements Parcelable { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -171,7 +167,6 @@ public class TypeHolderDefault implements Parcelable { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java index a1c16610d3f..8f03c4f5bc9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -78,7 +78,6 @@ public class TypeHolderExample implements Parcelable { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -101,7 +100,6 @@ public class TypeHolderExample implements Parcelable { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -124,7 +122,6 @@ public class TypeHolderExample implements Parcelable { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -147,7 +144,6 @@ public class TypeHolderExample implements Parcelable { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -170,7 +166,6 @@ public class TypeHolderExample implements Parcelable { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -198,7 +193,6 @@ public class TypeHolderExample implements Parcelable { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java index a97509e9416..db7bb59bd13 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java @@ -84,7 +84,6 @@ public class User implements Parcelable { } - public void setId(Long id) { this.id = id; } @@ -108,7 +107,6 @@ public class User implements Parcelable { } - public void setUsername(String username) { this.username = username; } @@ -132,7 +130,6 @@ public class User implements Parcelable { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -156,7 +153,6 @@ public class User implements Parcelable { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -180,7 +176,6 @@ public class User implements Parcelable { } - public void setEmail(String email) { this.email = email; } @@ -204,7 +199,6 @@ public class User implements Parcelable { } - public void setPassword(String password) { this.password = password; } @@ -228,7 +222,6 @@ public class User implements Parcelable { } - public void setPhone(String phone) { this.phone = phone; } @@ -252,7 +245,6 @@ public class User implements Parcelable { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java index c5f9a323ab0..c07f900734c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java @@ -171,7 +171,6 @@ public class XmlItem implements Parcelable { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -195,7 +194,6 @@ public class XmlItem implements Parcelable { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -219,7 +217,6 @@ public class XmlItem implements Parcelable { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -243,7 +240,6 @@ public class XmlItem implements Parcelable { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -275,7 +271,6 @@ public class XmlItem implements Parcelable { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -299,7 +294,6 @@ public class XmlItem implements Parcelable { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -323,7 +317,6 @@ public class XmlItem implements Parcelable { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -347,7 +340,6 @@ public class XmlItem implements Parcelable { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -371,7 +363,6 @@ public class XmlItem implements Parcelable { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -403,7 +394,6 @@ public class XmlItem implements Parcelable { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -435,7 +425,6 @@ public class XmlItem implements Parcelable { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -459,7 +448,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -483,7 +471,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -507,7 +494,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -531,7 +517,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -563,7 +548,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -595,7 +579,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -619,7 +602,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -643,7 +625,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -667,7 +648,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -691,7 +671,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -723,7 +702,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -755,7 +733,6 @@ public class XmlItem implements Parcelable { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -779,7 +756,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -803,7 +779,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -827,7 +802,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -851,7 +825,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -883,7 +856,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -915,7 +887,6 @@ public class XmlItem implements Parcelable { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index f06992506a4..0e7e2aaed63 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -106,7 +106,7 @@ dependencies { compile 'io.gsonfire:gson-fire:1.8.3' compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' - compile 'org.threeten:threetenbp:1.3.5' + compile 'org.threeten:threetenbp:1.4.0' testCompile 'junit:junit:4.12' } diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index 1bc31c01101..987da596bfc 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "com.google.code.gson" % "gson" % "2.8.5", "org.apache.commons" % "commons-lang3" % "3.9", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson/docs/Name.md b/samples/client/petstore/java/okhttp-gson/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index bedbc32a433..9a873bf9cd5 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -263,7 +263,7 @@ 3.14.2 2.8.5 3.9 - 1.3.8 + 1.4.0 1.0.0 1.0 4.12 diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index 42fc1fa212a..843e662b781 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -15,6 +15,7 @@ package org.openapitools.client; import okhttp3.*; import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; import okio.BufferedSink; @@ -60,6 +61,7 @@ public class ApiClient { private String basePath = "http://petstore.swagger.io:80/v2"; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String tempFolderPath = null; private Map authentications; @@ -409,6 +411,18 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + /** * Check that whether debugging is enabled for this API client. * @@ -1034,14 +1048,15 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, callback); + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1055,18 +1070,20 @@ public class ApiClient { * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws ApiException If fail to serialize the request body object */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final String url = buildUrl(path, queryParams, collectionQueryParams); final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); String contentType = (String) headerParams.get("Content-Type"); // ensuring a default content type @@ -1161,8 +1178,8 @@ public class ApiClient { /** * Set header parameters to the request builder, including default headers. * - * @param headerParams Header parameters in the ofrm of Map - * @param reqBuilder Reqeust.Builder + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder */ public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { for (Entry param : headerParams.entrySet()) { @@ -1175,20 +1192,38 @@ public class ApiClient { } } + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } @@ -1271,8 +1306,8 @@ public class ApiClient { */ private void applySslSettings() { try { - TrustManager[] trustManagers = null; - HostnameVerifier hostnameVerifier = null; + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; if (!verifyingSsl) { trustManagers = new TrustManager[]{ new X509TrustManager() { @@ -1290,40 +1325,42 @@ public class ApiClient { } } }; - SSLContext sslContext = SSLContext.getInstance("TLS"); hostnameVerifier = new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }; - } else if (sslCaCert != null) { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - trustManagerFactory.init(caKeyStore); - trustManagers = trustManagerFactory.getTrustManagers(); - } - - if (keyManagers != null || trustManagers != null) { - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]).build(); } else { - httpClient = httpClient.newBuilder().sslSocketFactory(null, (X509TrustManager) trustManagers[0]).build(); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; } - httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build(); + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index c9978a6f869..7dc96ac1afb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -75,6 +75,7 @@ public class AnotherFakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -91,7 +92,7 @@ public class AnotherFakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index c070ab31835..ac29cdbe1e1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -83,6 +83,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -99,7 +100,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -188,6 +189,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -204,7 +206,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -292,6 +294,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -308,7 +311,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -396,6 +399,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -412,7 +416,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -500,6 +504,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" @@ -516,7 +521,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -604,6 +609,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -620,7 +626,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -714,6 +720,7 @@ public class FakeApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -730,7 +737,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -827,6 +834,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -843,7 +851,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -950,6 +958,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (integer != null) { localVarFormParams.put("integer", integer); @@ -1022,7 +1031,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "http_basic_test" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1200,6 +1209,7 @@ public class FakeApi { localVarHeaderParams.put("enum_header_string", localVarApiClient.parameterToString(enumHeaderString)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (enumFormStringArray != null) { localVarFormParams.put("enum_form_string_array", enumFormStringArray); @@ -1224,7 +1234,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1344,6 +1354,7 @@ public class FakeApi { localVarHeaderParams.put("boolean_group", localVarApiClient.parameterToString(booleanGroup)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1360,7 +1371,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1539,6 +1550,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1555,7 +1567,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1645,6 +1657,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (param != null) { localVarFormParams.put("param", param); @@ -1669,7 +1682,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1790,6 +1803,7 @@ public class FakeApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -1806,7 +1820,7 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 621c27fd295..fe3f9926447 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -75,6 +75,7 @@ public class FakeClassnameTags123Api { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -91,7 +92,7 @@ public class FakeClassnameTags123Api { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key_query" }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index c0c72236815..18c2941546d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -78,6 +78,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -94,7 +95,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -193,6 +194,7 @@ public class PetApi { localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); } + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -209,7 +211,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -309,6 +311,7 @@ public class PetApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -325,7 +328,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -428,6 +431,7 @@ public class PetApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -444,7 +448,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @@ -550,6 +554,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -566,7 +571,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -668,6 +673,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -684,7 +690,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -785,6 +791,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (name != null) { localVarFormParams.put("name", name); @@ -809,7 +816,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -907,6 +914,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (additionalMetadata != null) { localVarFormParams.put("additionalMetadata", additionalMetadata); @@ -931,7 +939,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -1033,6 +1041,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (additionalMetadata != null) { localVarFormParams.put("additionalMetadata", additionalMetadata); @@ -1057,7 +1066,7 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index 748ae2e8c0a..a75ea2ae48f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -77,6 +77,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -93,7 +94,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -184,6 +185,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" @@ -200,7 +202,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -288,6 +290,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -304,7 +307,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -404,6 +407,7 @@ public class StoreApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -420,7 +424,7 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index d96b89b607c..567006c4740 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -75,6 +75,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -91,7 +92,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -180,6 +181,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -196,7 +198,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -285,6 +287,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -301,7 +304,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -392,6 +395,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -408,7 +412,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -503,6 +507,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -519,7 +524,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -628,6 +633,7 @@ public class UserApi { } Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/xml", "application/json" @@ -644,7 +650,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -747,6 +753,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -763,7 +770,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") @@ -847,6 +854,7 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { @@ -863,7 +871,7 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 427a130a2d0..959a3211653 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -43,7 +43,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/RetryingOAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/RetryingOAuth.java index 7022c5c8c9e..965351d0635 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/RetryingOAuth.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/RetryingOAuth.java @@ -168,7 +168,7 @@ public class RetryingOAuth extends OAuth implements Interceptor { // Applying authorization to parameters is performed in the retryingIntercept method @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { // No implementation necessary } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 8829c547501..56c305ade13 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java index d20d19aa53f..dcd1a8e3b90 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index b1ad2d012fb..5983420c81b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 815cf8d5e05..527853d7522 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index 8b4c1c910b7..33d57e18bee 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index 3db0e2e26c9..1efe43b234b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index e61b1492abc..978cdb6f78d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderExample.java index bf0f4550ccb..878b1540ee7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/XmlItem.java index 4fce3d5e1c0..ecfd0be1b31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java index fa9f3afbdd7..2b32dccf324 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -61,6 +61,7 @@ public class PetApiTest { ApiClient oldClient = api.getApiClient(); ApiClient newClient = new ApiClient(); + newClient.setVerifyingSsl(true); newClient.setBasePath("http://example.com"); newClient.setDebugging(true); @@ -145,6 +146,14 @@ public class PetApiTest { } } while (result.isEmpty()); assertPetMatches(pet, fetched); + } + + @Test + public void testCreateAndGetPetAsyncInvalidID() throws Exception { + Pet pet = createPet(); + api.addPet(pet); + // to store returned Pet or error message/exception + final Map result = new HashMap(); // test getting a nonexistent pet result.clear(); @@ -171,8 +180,11 @@ public class PetApiTest { }); // wait for the asynchronous call to finish (at most 10 seconds) - tryCount = 1; + final int maxTry = 10; + int tryCount = 1; + Pet fetched = null; ApiException exception = null; + do { if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); Thread.sleep(1000); @@ -413,16 +425,16 @@ public class PetApiTest { assertEquals(expected.getId(), actual.getId()); assertNotNull(actual.getCategory()); assertEquals(expected.getCategory().getName(), - actual.getCategory().getName()); + actual.getCategory().getName()); } /** * Assert that the given upload/download progress list satisfies the * following constraints: - * - * - List is not empty - * - Byte count should be nondecreasing - * - The last element, and only the last element, should have done=true + *

+ * - List is not empty + * - Byte count should be nondecreasing + * - The last element, and only the last element, should have done=true */ private void assertValidProgress(List progressList) { assertFalse(progressList.isEmpty()); @@ -433,7 +445,7 @@ public class PetApiTest { if (prev != null) { if (prev.done || prev.bytes > progress.bytes) { fail("Progress list out of order at index " + index - + ": " + progressList); + + ": " + progressList); } } prev = progress; @@ -449,9 +461,9 @@ public class PetApiTest { private final CountDownLatch latch; private final ConcurrentLinkedQueue uploadProgress = - new ConcurrentLinkedQueue(); + new ConcurrentLinkedQueue(); private final ConcurrentLinkedQueue downloadProgress = - new ConcurrentLinkedQueue(); + new ConcurrentLinkedQueue(); private boolean done; private boolean success; diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index d5a88132307..da25043b27e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -15,46 +15,52 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); for (Pair queryParam : queryParams) { assertEquals("my-api-key", queryParam.getValue()); } - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInQueryWithNullValue() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); } @@ -63,14 +69,51 @@ public class ApiKeyAuthTest { public void testApplyToParamsInHeaderWithNullValue() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey(null); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); + assertEquals(0, headerParams.size()); + } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or header parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); + } + + @Test + public void testApplyToParamsInCookieWithNullValue() { + List queryParams = new ArrayList(); + Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey(null); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to parameters + assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(0, headerParams.size()); } } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index d27a15f4dc0..e963ea24f7f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -22,13 +22,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { List queryParams = new ArrayList(); Map headerParams = new HashMap(); + Map cookieParams = new HashMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -36,7 +38,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization")); @@ -44,7 +46,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization")); @@ -54,7 +56,7 @@ public class HttpBasicAuthTest { headerParams = new HashMap(); auth.setUsername(null); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // no changes to parameters assertEquals(0, queryParams.size()); assertEquals(0, headerParams.size()); diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index 135f2fc93d4..c7691593cd6 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -100,7 +100,7 @@ ext { junit_version = "4.12" gson_version = "2.8.5" gson_fire_version = "1.8.3" - threetenbp_version = "1.3.8" + threetenbp_version = "1.4.0" okio_version = "1.13.0" } diff --git a/samples/client/petstore/java/rest-assured/build.sbt b/samples/client/petstore/java/rest-assured/build.sbt index 4bc8d014b71..fdc880df0c2 100644 --- a/samples/client/petstore/java/rest-assured/build.sbt +++ b/samples/client/petstore/java/rest-assured/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "io.rest-assured" % "scala-support" % "4.0.0", "com.google.code.gson" % "gson" % "2.8.5", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "org.threeten" % "threetenbp" % "1.3.8" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "com.squareup.okio" % "okio" % "1.13.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/samples/client/petstore/java/rest-assured/docs/ClassModel.md b/samples/client/petstore/java/rest-assured/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/rest-assured/docs/ClassModel.md +++ b/samples/client/petstore/java/rest-assured/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/rest-assured/docs/Model200Response.md b/samples/client/petstore/java/rest-assured/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/rest-assured/docs/Model200Response.md +++ b/samples/client/petstore/java/rest-assured/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/rest-assured/docs/ModelReturn.md b/samples/client/petstore/java/rest-assured/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/rest-assured/docs/ModelReturn.md +++ b/samples/client/petstore/java/rest-assured/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/rest-assured/docs/Name.md b/samples/client/petstore/java/rest-assured/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/rest-assured/docs/Name.md +++ b/samples/client/petstore/java/rest-assured/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/rest-assured/pom.xml b/samples/client/petstore/java/rest-assured/pom.xml index 7c3d394676b..c33e3aa0059 100644 --- a/samples/client/petstore/java/rest-assured/pom.xml +++ b/samples/client/petstore/java/rest-assured/pom.xml @@ -245,7 +245,7 @@ 2.8.5 1.8.3 1.0.0 - 1.3.8 + 1.4.0 1.13.0 4.12 diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java index 65795e6d7ac..e5a45ef03d8 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java index 94268aba4af..3299c8ea877 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java index b1ad2d012fb..5983420c81b 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 815cf8d5e05..527853d7522 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java index 550086024f5..4e41a3dc88e 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java index 0147882173c..96b1237f82f 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 2a91f01e7cd..b6cea1fd768 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 9c981c42ea2..787d0123cce 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java index fd741c73012..44f00ecc1bd 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index cbbbb511692..88807867992 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -98,7 +98,7 @@ ext { jackson_version = "2.9.10" jackson_databind_version = "2.9.10" jackson_databind_nullable_version = "0.2.0" - threetenbp_version = "2.6.4" + threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" jodatime_version = "2.9.9" junit_version = "4.12" diff --git a/samples/client/petstore/java/resteasy/build.sbt b/samples/client/petstore/java/resteasy/build.sbt index 7b4207991b7..970818ece93 100644 --- a/samples/client/petstore/java/resteasy/build.sbt +++ b/samples/client/petstore/java/resteasy/build.sbt @@ -16,8 +16,8 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.9" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "joda-time" % "joda-time" % "2.9.9" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "junit" % "junit" % "4.12" % "test", diff --git a/samples/client/petstore/java/resteasy/docs/ClassModel.md b/samples/client/petstore/java/resteasy/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/resteasy/docs/ClassModel.md +++ b/samples/client/petstore/java/resteasy/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resteasy/docs/Model200Response.md b/samples/client/petstore/java/resteasy/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/resteasy/docs/Model200Response.md +++ b/samples/client/petstore/java/resteasy/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resteasy/docs/ModelReturn.md b/samples/client/petstore/java/resteasy/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/resteasy/docs/ModelReturn.md +++ b/samples/client/petstore/java/resteasy/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resteasy/docs/Name.md b/samples/client/petstore/java/resteasy/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/resteasy/docs/Name.md +++ b/samples/client/petstore/java/resteasy/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resteasy/pom.xml b/samples/client/petstore/java/resteasy/pom.xml index 829d0971d39..eae70733feb 100644 --- a/samples/client/petstore/java/resteasy/pom.xml +++ b/samples/client/petstore/java/resteasy/pom.xml @@ -246,7 +246,7 @@ 2.9.10 2.9.10 0.2.0 - 2.6.4 + 2.9.10 2.9.9 1.0.0 4.12 diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java index 51552f8230d..4738f8c3d0c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java @@ -48,6 +48,7 @@ import org.openapitools.client.auth.OAuth; public class ApiClient { private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); private String basePath = "http://petstore.swagger.io:80/v2"; private boolean debugging = false; @@ -601,6 +602,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -609,8 +611,8 @@ public class ApiClient { * @return The response body in type of string * @throws ApiException if the invocation failed */ - public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); + public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -642,6 +644,22 @@ public class ApiClient { } } + for (Entry cookieParamsEntry : cookieParams.entrySet()) { + String value = cookieParamsEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(cookieParamsEntry.getKey(), value); + } + } + + for (Entry defaultCookieEntry: defaultHeaderMap.entrySet()) { + if (!cookieParams.containsKey(defaultCookieEntry.getKey())) { + String value = defaultCookieEntry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(defaultCookieEntry.getKey(), value); + } + } + } + Entity entity = serialize(body, formParams, contentType); Response response = null; @@ -724,11 +742,11 @@ public class ApiClient { * * @param authNames The authentications to apply */ - private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 57113725de9..12ee9b4852c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -55,11 +55,13 @@ public class AnotherFakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -73,6 +75,6 @@ public class AnotherFakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index bf9c1667efe..c98e422a868 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -62,11 +62,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -80,7 +82,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -98,11 +100,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -116,7 +120,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -134,11 +138,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -152,7 +158,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -170,11 +176,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -188,7 +196,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -206,11 +214,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "*/*" }; @@ -224,7 +234,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * @@ -246,11 +256,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -264,7 +276,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -292,12 +304,14 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + final String[] localVarAccepts = { }; @@ -311,7 +325,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test \"client\" model @@ -334,11 +348,13 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -352,7 +368,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -402,10 +418,12 @@ public class FakeApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (integer != null) localVarFormParams.put("integer", integer); if (int32 != null) @@ -448,7 +466,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * To test enum parameters @@ -472,6 +490,7 @@ if (paramCallback != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); @@ -484,6 +503,7 @@ if (paramCallback != null) if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -502,7 +522,7 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Fake endpoint to test group parameters (optional) @@ -539,6 +559,7 @@ if (enumFormString != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); @@ -552,6 +573,7 @@ if (booleanGroup != null) localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + final String[] localVarAccepts = { }; @@ -565,7 +587,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test inline additionalProperties @@ -587,11 +609,13 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -605,7 +629,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * test json serialization of form data @@ -633,10 +657,12 @@ if (booleanGroup != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (param != null) localVarFormParams.put("param", param); if (param2 != null) @@ -655,7 +681,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -701,6 +727,7 @@ if (param2 != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); @@ -711,6 +738,7 @@ if (param2 != null) + final String[] localVarAccepts = { }; @@ -724,6 +752,6 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 8665a51dc95..620e2e6a607 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -55,11 +55,13 @@ public class FakeClassnameTags123Api { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -73,6 +75,6 @@ public class FakeClassnameTags123Api { String[] localVarAuthNames = new String[] { "api_key_query" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java index 4d85cdd1fe4..2f4b2c8561d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java @@ -56,11 +56,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -74,7 +76,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes a pet @@ -98,6 +100,7 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -105,6 +108,7 @@ public class PetApi { localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; @@ -118,7 +122,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Finds Pets by status @@ -141,12 +145,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -160,7 +166,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Finds Pets by tags @@ -185,12 +191,14 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -204,7 +212,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find pet by ID @@ -228,11 +236,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -246,7 +256,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update an existing pet @@ -268,11 +278,13 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -286,7 +298,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updates a pet in the store with form data @@ -311,10 +323,12 @@ public class PetApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -333,7 +347,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * uploads an image @@ -359,10 +373,12 @@ if (status != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) @@ -381,7 +397,7 @@ if (file != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * uploads an image (required) @@ -412,10 +428,12 @@ if (file != null) // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -434,6 +452,6 @@ if (requiredFile != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java index c88879d7e84..c6d4d3cdaf9 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java @@ -55,11 +55,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -73,7 +75,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Returns pet inventories by status @@ -90,11 +92,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/json" }; @@ -108,7 +112,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Find purchase order by ID @@ -132,11 +136,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -150,7 +156,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Place an order for a pet @@ -173,11 +179,13 @@ public class StoreApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -191,6 +199,6 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java index ee251c3858d..4a823799de8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java @@ -54,11 +54,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -72,7 +74,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -94,11 +96,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -112,7 +116,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Creates list of users with given input array @@ -134,11 +138,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -152,7 +158,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Delete user @@ -175,11 +181,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -193,7 +201,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Get user by user name @@ -217,11 +225,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -235,7 +245,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs user into the system @@ -264,6 +274,7 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -271,6 +282,7 @@ public class UserApi { + final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -284,7 +296,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Logs out current logged in user session @@ -300,11 +312,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -318,7 +332,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Updated user @@ -347,11 +361,13 @@ public class UserApi { // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { }; @@ -365,6 +381,6 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8d1d86ffc4c..a9427105d81 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 35e28a5244a..98993417bee 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -44,7 +44,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 9fb739f7d08..e20259cb94c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -46,7 +46,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if(bearerToken == null) { return; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuth.java index 5f33142af35..779680c9b2f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java index dabd18a06a1..6e281630216 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c9bb8bcebec..73f39358794 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 32a4d8bb6e4..e3daa1a3e1c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java index 75b1edce8d9..f585a625223 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index a1b680873b2..bf15581bd7a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -102,7 +102,7 @@ ext { spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" - jackson_threeten_version = "2.6.4" + jackson_threeten_version = "2.9.10" } dependencies { diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md b/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md b/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md b/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/Name.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 74763f9a6c8..f1a9c461118 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -267,10 +267,10 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.9 - 2.9.9 + 2.9.10 + 2.9.10 0.2.0 - 2.6.4 + 2.9.10 1.0.0 4.12 diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java index 007c0b9d7ad..7c205678775 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java @@ -84,6 +84,7 @@ public class ApiClient { private boolean debugging = false; private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); private String basePath = "http://petstore.swagger.io:80/v2"; @@ -270,6 +271,21 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + public void setDebugging(boolean debugging) { List currentInterceptors = this.restTemplate.getInterceptors(); if(debugging) { @@ -544,6 +560,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -551,8 +568,8 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return ResponseEntity<T> The response of the chosen type */ - public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); if (queryParams != null) { @@ -588,6 +605,8 @@ public class ApiClient { addHeadersToRequest(headerParams, requestBuilder); addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); RequestEntity requestEntity = requestBuilder.body(selectBody(body, formParams, contentType)); @@ -617,6 +636,29 @@ public class ApiClient { } } + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, BodyBuilder requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + private String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + for (String value : entry.getValue()) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + /** * Build the RestTemplate used to make HTTP requests. * @return RestTemplate @@ -654,13 +696,13 @@ public class ApiClient { * @param queryParams The query parameters * @param headerParams The header parameters */ - private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams) { + private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RestClientException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 542171d1d50..228f314f400 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -80,6 +80,7 @@ public class AnotherFakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -94,6 +95,6 @@ public class AnotherFakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 73d0e62ffaa..b81253b2a27 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -87,6 +87,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -99,7 +100,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -128,6 +129,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -140,7 +142,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -169,6 +171,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -181,7 +184,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -210,6 +213,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -222,7 +226,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -251,6 +255,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -263,7 +268,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -296,6 +301,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -308,7 +314,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -348,6 +354,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query", query)); @@ -362,7 +369,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test \"client\" model @@ -396,6 +403,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -410,7 +418,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -486,6 +494,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (integer != null) @@ -527,7 +536,7 @@ public class FakeApi { String[] authNames = new String[] { "http_basic_test" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test enum parameters @@ -571,6 +580,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); @@ -598,7 +608,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint to test group parameters (optional) @@ -651,6 +661,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_string_group", requiredStringGroup)); @@ -671,7 +682,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test inline additionalProperties @@ -704,6 +715,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -716,7 +728,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test json serialization of form data @@ -756,6 +768,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (param != null) @@ -773,7 +786,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -834,6 +847,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); @@ -850,6 +864,6 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 74d86633d8b..3a7d224bef4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -80,6 +80,7 @@ public class FakeClassnameTags123Api { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -94,6 +95,6 @@ public class FakeClassnameTags123Api { String[] authNames = new String[] { "api_key_query" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index 31c2f785a28..f061786a681 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,6 +83,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -95,7 +96,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Deletes a pet @@ -135,6 +136,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (apiKey != null) @@ -148,7 +150,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by status @@ -184,6 +186,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); @@ -198,7 +201,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by tags @@ -236,6 +239,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); @@ -250,7 +254,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find pet by ID @@ -291,6 +295,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -303,7 +308,7 @@ public class PetApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Update an existing pet @@ -342,6 +347,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -354,7 +360,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updates a pet in the store with form data @@ -394,6 +400,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (name != null) @@ -411,7 +418,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image @@ -452,6 +459,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) @@ -471,7 +479,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image (required) @@ -517,6 +525,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) @@ -536,6 +545,6 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 29b990a85d1..024afa54d3a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -84,6 +84,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -94,7 +95,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Returns pet inventories by status @@ -121,6 +122,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -133,7 +135,7 @@ public class StoreApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find purchase order by ID @@ -174,6 +176,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -186,7 +189,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Place an order for a pet @@ -222,6 +225,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -234,6 +238,6 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 66db8e8cd14..3844754d020 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -79,6 +79,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -89,7 +90,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -122,6 +123,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -132,7 +134,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -165,6 +167,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -175,7 +178,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Delete user @@ -213,6 +216,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -223,7 +227,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Get user by user name @@ -264,6 +268,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -276,7 +281,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs user into the system @@ -319,6 +324,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); @@ -334,7 +340,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs out current logged in user session @@ -360,6 +366,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -370,7 +377,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updated user @@ -415,6 +422,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -425,6 +433,6 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 49f3b7fb8a3..bbd04ba629d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -41,7 +41,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (apiKey == null) { return; } @@ -55,6 +55,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(paramName, value); } else if (location.equals("header")) { headerParams.add(paramName, value); - } + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/Authentication.java index 7320ba74894..4f9a14ebd7c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/Authentication.java @@ -4,10 +4,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; public interface Authentication { - /** + /** * Apply authentication settings to header and / or query parameters. - * @param queryParams The query parameters for the request + * @param queryParams The query parameters for the request * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request */ - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ca0caef260f..903582344d1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -29,7 +29,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 5e6b713b809..07848898902 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -25,7 +25,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (bearerToken == null) { return; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/OAuth.java index 9b7588ec14f..a1782cdb9e1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/auth/OAuth.java @@ -16,7 +16,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (accessToken != null) { headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 8e7cbfcf1b2..6dd4c1d5fd3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -64,7 +64,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 21d7cddc977..c06c0c1470e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -65,7 +65,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 3d77005056f..eddbbd859d1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -64,7 +64,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 323234e0584..c8b96f0db2d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -147,7 +147,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -181,7 +180,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -215,7 +213,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -249,7 +246,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -283,7 +279,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -317,7 +312,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -351,7 +345,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -385,7 +378,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -412,7 +404,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -439,7 +430,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -466,7 +456,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index a1697af5fdc..cd5c55b0d18 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -64,7 +64,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 2885d93234f..49b741ff957 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -65,7 +65,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 44b7e8f4c75..ac216a38970 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -64,7 +64,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index bc3f9aae257..a24db92f4c1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -64,7 +64,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index 1a1cba4a682..38646431b45 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -74,7 +74,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -101,7 +100,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index ff8f7245a29..e35b35971ce 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -75,7 +75,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index c20a3cce74c..1a579457da7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -75,7 +75,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java index 031eac54b21..df355f7e881 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -91,7 +91,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -125,7 +124,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -159,7 +157,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java index 1ea4534169a..b3192d836a9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java @@ -87,7 +87,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -114,7 +113,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -141,7 +139,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -168,7 +165,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -195,7 +191,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -222,7 +217,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java index f674ee10cf9..dc8fdcace40 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java @@ -64,7 +64,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java index b932c985c32..ef047259bec 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -62,7 +62,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java index 5d6fed6ea91..b42fb4508ad 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java @@ -67,7 +67,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -93,7 +92,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java index 391d1334534..2a3625d71bf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java @@ -63,7 +63,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java index bedf7d9c434..8e5280c4cbd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java @@ -62,7 +62,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java index 873dc141186..12f4697f2c0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java @@ -64,7 +64,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java index 3b05cc3bd3a..2a07c1db3da 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -62,7 +62,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java index 49d707b1ee0..e67e1a227eb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -142,7 +142,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -176,7 +175,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index 2027735cb9b..a2f2836ed32 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -227,7 +227,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -253,7 +252,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -280,7 +278,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -307,7 +304,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -334,7 +330,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 99e581462cf..15d519f5e68 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -72,7 +72,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -106,7 +105,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index 3c8b4fcb260..302fc9e501a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -134,7 +134,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -163,7 +162,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -190,7 +188,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -218,7 +215,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -247,7 +243,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -276,7 +271,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -303,7 +297,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -329,7 +322,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -356,7 +348,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -382,7 +373,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -409,7 +399,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -436,7 +425,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -462,7 +450,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -489,7 +476,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index 3a418ffb139..0f7c9781592 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -134,7 +134,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -168,7 +167,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -202,7 +200,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -236,7 +233,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8270fdd3d08..30c2adcf1c6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -81,7 +81,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -108,7 +107,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -142,7 +140,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java index c4f17d9a852..3d5fb315b77 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java @@ -68,7 +68,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -95,7 +94,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 7ca9db80151..d1aa54e3ec6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -72,7 +72,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -99,7 +98,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -126,7 +124,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java index fa74761c4eb..1faca465c9c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -63,7 +63,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java index f9949996650..5ba7843e8aa 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java @@ -77,7 +77,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -121,7 +120,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java index 57227fd93d1..5f3b1eb5b1f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -63,7 +63,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java index 42b0244a11c..90cc286825b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java @@ -125,7 +125,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -152,7 +151,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -179,7 +177,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -206,7 +203,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -233,7 +229,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -260,7 +255,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index 5ffdea475d2..112a4d8c089 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -73,7 +73,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -100,7 +99,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -127,7 +125,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java index 065a5110934..e4ad0c3e252 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java @@ -136,7 +136,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -163,7 +162,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -189,7 +187,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -221,7 +218,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -257,7 +253,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -284,7 +279,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 3221e8a62b2..7db0e8024f8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -84,7 +84,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java index 1c7603ec4dc..7a23d4c3801 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -62,7 +62,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java index 54a473f799e..775a898861b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java @@ -67,7 +67,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -94,7 +93,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 923a0522f40..bc95502e821 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -87,7 +87,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -113,7 +112,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -139,7 +137,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -165,7 +162,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -195,7 +191,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java index e8f45869916..e6b20d8a093 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -92,7 +92,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -118,7 +117,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -144,7 +142,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -170,7 +167,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -196,7 +192,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -226,7 +221,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java index ffe7d14f3b2..1fc14613b9a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java @@ -97,7 +97,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -124,7 +123,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -151,7 +149,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -178,7 +175,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -205,7 +201,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -232,7 +227,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -259,7 +253,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -286,7 +279,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java index 5bdc87bc364..42091b2e28d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java @@ -237,7 +237,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -264,7 +263,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -291,7 +289,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -318,7 +315,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -354,7 +350,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -381,7 +376,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -408,7 +402,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -435,7 +428,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -462,7 +454,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -496,7 +487,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -532,7 +522,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -559,7 +548,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -586,7 +574,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -613,7 +600,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -640,7 +626,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -674,7 +659,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -710,7 +694,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -737,7 +720,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -764,7 +746,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -791,7 +772,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -818,7 +798,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -852,7 +831,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -888,7 +866,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -915,7 +892,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -942,7 +918,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -969,7 +944,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -996,7 +970,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -1030,7 +1003,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -1066,7 +1038,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 7c26e098749..183613ceea3 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -102,7 +102,7 @@ ext { spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" - jackson_threeten_version = "2.6.4" + jackson_threeten_version = "2.9.10" } dependencies { diff --git a/samples/client/petstore/java/resttemplate/docs/ClassModel.md b/samples/client/petstore/java/resttemplate/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/resttemplate/docs/ClassModel.md +++ b/samples/client/petstore/java/resttemplate/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate/docs/Model200Response.md b/samples/client/petstore/java/resttemplate/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/resttemplate/docs/Model200Response.md +++ b/samples/client/petstore/java/resttemplate/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate/docs/ModelReturn.md b/samples/client/petstore/java/resttemplate/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/resttemplate/docs/ModelReturn.md +++ b/samples/client/petstore/java/resttemplate/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate/docs/Name.md b/samples/client/petstore/java/resttemplate/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/resttemplate/docs/Name.md +++ b/samples/client/petstore/java/resttemplate/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 314fb7f6a7c..db01327bc5a 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -259,10 +259,10 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.9 - 2.9.9 + 2.9.10 + 2.9.10 0.2.0 - 2.6.4 + 2.9.10 1.0.0 4.12 diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java index 5915c3dc666..dd0f9ebd40d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java @@ -79,6 +79,7 @@ public class ApiClient { private boolean debugging = false; private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); private String basePath = "http://petstore.swagger.io:80/v2"; @@ -265,6 +266,21 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + public void setDebugging(boolean debugging) { List currentInterceptors = this.restTemplate.getInterceptors(); if(debugging) { @@ -539,6 +555,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header @@ -546,8 +563,8 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return ResponseEntity<T> The response of the chosen type */ - public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - updateParamsForAuth(authNames, queryParams, headerParams); + public ResponseEntity invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); if (queryParams != null) { @@ -583,6 +600,8 @@ public class ApiClient { addHeadersToRequest(headerParams, requestBuilder); addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); RequestEntity requestEntity = requestBuilder.body(selectBody(body, formParams, contentType)); @@ -612,6 +631,29 @@ public class ApiClient { } } + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, BodyBuilder requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + private String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + for (String value : entry.getValue()) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + /** * Build the RestTemplate used to make HTTP requests. * @return RestTemplate @@ -641,13 +683,13 @@ public class ApiClient { * @param queryParams The query parameters * @param headerParams The header parameters */ - private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams) { + private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RestClientException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/CustomInstantDeserializer.java index 7e115295be6..83d4514b071 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.Function; import org.threeten.bp.DateTimeException; +import org.threeten.bp.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public class CustomInstantDeserializer private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 542171d1d50..228f314f400 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -80,6 +80,7 @@ public class AnotherFakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -94,6 +95,6 @@ public class AnotherFakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 73d0e62ffaa..b81253b2a27 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -87,6 +87,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -99,7 +100,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -128,6 +129,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -140,7 +142,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -169,6 +171,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -181,7 +184,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -210,6 +213,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -222,7 +226,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -251,6 +255,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -263,7 +268,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -296,6 +301,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -308,7 +314,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -348,6 +354,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query", query)); @@ -362,7 +369,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test \"client\" model @@ -396,6 +403,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -410,7 +418,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -486,6 +494,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (integer != null) @@ -527,7 +536,7 @@ public class FakeApi { String[] authNames = new String[] { "http_basic_test" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test enum parameters @@ -571,6 +580,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); @@ -598,7 +608,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint to test group parameters (optional) @@ -651,6 +661,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_string_group", requiredStringGroup)); @@ -671,7 +682,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test inline additionalProperties @@ -704,6 +715,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -716,7 +728,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test json serialization of form data @@ -756,6 +768,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (param != null) @@ -773,7 +786,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -834,6 +847,7 @@ public class FakeApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); @@ -850,6 +864,6 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 74d86633d8b..3a7d224bef4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -80,6 +80,7 @@ public class FakeClassnameTags123Api { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -94,6 +95,6 @@ public class FakeClassnameTags123Api { String[] authNames = new String[] { "api_key_query" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index 31c2f785a28..f061786a681 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,6 +83,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -95,7 +96,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Deletes a pet @@ -135,6 +136,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (apiKey != null) @@ -148,7 +150,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by status @@ -184,6 +186,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); @@ -198,7 +201,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by tags @@ -236,6 +239,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); @@ -250,7 +254,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find pet by ID @@ -291,6 +295,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -303,7 +308,7 @@ public class PetApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Update an existing pet @@ -342,6 +347,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -354,7 +360,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updates a pet in the store with form data @@ -394,6 +400,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (name != null) @@ -411,7 +418,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image @@ -452,6 +459,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) @@ -471,7 +479,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image (required) @@ -517,6 +525,7 @@ public class PetApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (additionalMetadata != null) @@ -536,6 +545,6 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 29b990a85d1..024afa54d3a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -84,6 +84,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -94,7 +95,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Returns pet inventories by status @@ -121,6 +122,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -133,7 +135,7 @@ public class StoreApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find purchase order by ID @@ -174,6 +176,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -186,7 +189,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Place an order for a pet @@ -222,6 +225,7 @@ public class StoreApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -234,6 +238,6 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 66db8e8cd14..3844754d020 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -79,6 +79,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -89,7 +90,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -122,6 +123,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -132,7 +134,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -165,6 +167,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -175,7 +178,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Delete user @@ -213,6 +216,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -223,7 +227,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Get user by user name @@ -264,6 +268,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -276,7 +281,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs user into the system @@ -319,6 +324,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); @@ -334,7 +340,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs out current logged in user session @@ -360,6 +366,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -370,7 +377,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updated user @@ -415,6 +422,7 @@ public class UserApi { final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -425,6 +433,6 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 49f3b7fb8a3..bbd04ba629d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -41,7 +41,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (apiKey == null) { return; } @@ -55,6 +55,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(paramName, value); } else if (location.equals("header")) { headerParams.add(paramName, value); - } + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java index 7320ba74894..4f9a14ebd7c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java @@ -4,10 +4,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; public interface Authentication { - /** + /** * Apply authentication settings to header and / or query parameters. - * @param queryParams The query parameters for the request + * @param queryParams The query parameters for the request * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request */ - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ca0caef260f..903582344d1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -29,7 +29,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 5e6b713b809..07848898902 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -25,7 +25,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (bearerToken == null) { return; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/OAuth.java index 9b7588ec14f..a1782cdb9e1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/auth/OAuth.java @@ -16,7 +16,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (accessToken != null) { headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e0e0ddfb64b..781d4686e98 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index b3641265ed9..96f829bc648 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 7ba8a580f15..37e40dbd3ec 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java index cd0082b7af0..de7c895ac93 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java index 988c7335eb0..aff182cd498 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0854831ce8a..8166597792d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index aec1767bf9f..4dee7f6c9dc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index 2fee3e90d04..113f92dd9cb 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e59e697be72..d483d69700f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java index dabd18a06a1..6e281630216 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index e9213a2052c..be74dd5ca08 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c9bb8bcebec..73f39358794 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 32a4d8bb6e4..e3daa1a3e1c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java index 75b1edce8d9..f585a625223 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index eef07a5309c..2a21136cfe0 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -17,31 +17,53 @@ public class ApiKeyAuthTest { public void testApplyToParamsInQuery() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); assertEquals(1, queryParams.size()); assertEquals("my-api-key", queryParams.get("api_key").get(0)); - // no changes to header parameters + // no changes to header or cookie parameters assertEquals(0, headerParams.size()); + assertEquals(0, cookieParams.size()); } @Test public void testApplyToParamsInHeaderWithPrefix() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); auth.setApiKey("my-api-token"); auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN").get(0)); } + + @Test + public void testApplyToParamsInCookieWithPrefix() { + MultiValueMap queryParams = new LinkedMultiValueMap(); + HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); + + ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); + auth.setApiKey("my-api-token"); + auth.setApiKeyPrefix("Token"); + auth.applyToParams(queryParams, headerParams, cookieParams); + + // no changes to query or cookie parameters + assertEquals(0, queryParams.size()); + assertEquals(0, headerParams.size()); + assertEquals(1, cookieParams.size()); + assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN").get(0)); + } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index 04522ec56c5..79eec957fcb 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -24,13 +24,15 @@ public class HttpBasicAuthTest { public void testApplyToParams() { MultiValueMap queryParams = new LinkedMultiValueMap(); HttpHeaders headerParams = new HttpHeaders(); + MultiValueMap cookieParams = new LinkedMultiValueMap(); auth.setUsername("my-username"); auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to query parameters + // no changes to query or cookie parameters assertEquals(0, queryParams.size()); + assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; @@ -38,7 +40,7 @@ public class HttpBasicAuthTest { // null username should be treated as empty string auth.setUsername(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of ":my-password" with the "Basic " prefix expected = "Basic Om15LXBhc3N3b3Jk"; assertEquals(expected, headerParams.get("Authorization").get(1)); @@ -46,7 +48,7 @@ public class HttpBasicAuthTest { // null password should be treated as empty string auth.setUsername("my-username"); auth.setPassword(null); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); // the string below is base64-encoded result of "my-username:" with the "Basic " prefix expected = "Basic bXktdXNlcm5hbWU6"; assertEquals(expected, headerParams.get("Authorization").get(2)); diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java index c1184d7d719..b9e28485ed6 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java @@ -134,7 +134,7 @@ public class ApiClient { public S createService(Class serviceClass) { return adapterBuilder.build().create(serviceClass); - + } /** @@ -225,7 +225,7 @@ public class ApiClient { } } } - + /** * Helper method to configure the oauth accessCode/implicit flow parameters * @param clientId Client ID @@ -247,7 +247,7 @@ public class ApiClient { } } } - + /** * Configures a listener which is notified when a new access token is received. * @param accessTokenListener Access token listener @@ -294,7 +294,7 @@ public class ApiClient { public OkHttpClient getOkClient() { return okClient; } - + public void addAuthsToOkClient(OkHttpClient okClient) { for(Interceptor apiAuthorization : apiAuthorizations.values()) { okClient.interceptors().add(apiAuthorization); diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index e098fded693..1d944d0e747 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -46,7 +46,7 @@ public class ApiKeyAuth implements Interceptor { if (newQuery == null) { newQuery = paramValue; } else { - newQuery += "&" + paramValue; + newQuery += "&" + paramValue; } URI newUri; @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java index 8829c547501..56c305ade13 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java index d20d19aa53f..dcd1a8e3b90 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java index 9391fe2efaa..cca2d4b5f2c 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(DateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index a9a390d1ffc..98860282e77 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(DateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java index dd421bef11d..c759e28d5ea 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(DateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java index 3db0e2e26c9..1efe43b234b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index e61b1492abc..978cdb6f78d 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java index bf0f4550ccb..878b1540ee7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java index 4fce3d5e1c0..ecfd0be1b31 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2-play24/docs/ClassModel.md b/samples/client/petstore/java/retrofit2-play24/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play24/docs/Model200Response.md b/samples/client/petstore/java/retrofit2-play24/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play24/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2-play24/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play24/docs/Name.md b/samples/client/petstore/java/retrofit2-play24/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/ApiClient.java index e4637e68ec4..49b7ef86296 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/ApiClient.java @@ -61,13 +61,14 @@ public class ApiClient { } Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); List extraQueryParams = new ArrayList<>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } ObjectMapper mapper = Json.mapper(); @@ -78,7 +79,7 @@ public class ApiClient { .baseUrl(basePath) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(JacksonConverterFactory.create(mapper)) - .callFactory(new Play24CallFactory(wsClient, extraHeaders, extraQueryParams)) + .callFactory(new Play24CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) .addCallAdapterFactory(new Play24CallAdapterFactory()) .build() .create(serviceClass); @@ -139,5 +140,3 @@ public class ApiClient { } - - diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/Play24CallFactory.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/Play24CallFactory.java index 6aa6c754334..0bcc385af46 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/Play24CallFactory.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/Play24CallFactory.java @@ -7,6 +7,7 @@ import play.libs.F; import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; +import play.libs.ws.WSCookie; import java.io.IOException; import java.net.MalformedURLException; @@ -29,6 +30,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); @@ -37,10 +41,12 @@ public class Play24CallFactory implements okhttp3.Call.Factory { } public Play24CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -51,6 +57,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -130,6 +139,7 @@ public class Play24CallFactory implements okhttp3.Call.Factory { try { wsRequest = wsClient.url(request.url().uri().toString()); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -149,6 +159,19 @@ public class Play24CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + private void addBody(WSRequest wsRequest) throws IOException { Buffer buffer = new Buffer(); request.body().writeTo(buffer); @@ -186,6 +209,9 @@ public class Play24CallFactory implements okhttp3.Call.Factory { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } builder.protocol(Protocol.HTTP_1_1); return builder.build(); diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index e9e52dcf796..809a01a9787 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -59,7 +59,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -73,6 +73,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 29ab38c51b9..0967f96bd1d 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index a9e1f16e700..9071c582806 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index ec4f41db591..8f134e614a8 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 91f163f405f..5bfa7d02c0f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -109,7 +109,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -144,7 +143,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -178,7 +176,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -212,7 +209,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -247,7 +243,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -282,7 +277,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -317,7 +311,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -352,7 +345,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -379,7 +371,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -406,7 +397,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -433,7 +423,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 9a8e56b6b81..94d4ece0c37 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 660ca6a4313..21088ae7434 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 9f24f09077b..58780e577cb 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 3978179bcf5..f3ece0e27ed 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java index 63f1aa5dec9..fa37d558448 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java @@ -69,7 +69,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -95,7 +94,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 483ba916ed5..93745951285 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 8753a7a8937..1658e715300 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayTest.java index 4df2dd31145..de001c2ec5e 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -76,7 +76,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -111,7 +110,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -146,7 +144,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Capitalization.java index 065d28841ca..28c74d28c02 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Capitalization.java @@ -77,7 +77,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -103,7 +102,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -129,7 +127,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -155,7 +152,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -181,7 +177,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -207,7 +202,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Cat.java index 8e87cb645ba..6bfe06bcafa 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Cat.java @@ -59,7 +59,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/CatAllOf.java index 30d9d8f4961..f62c8936adc 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -57,7 +57,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Category.java index 60ea5045dbc..35816bb041f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Category.java @@ -61,7 +61,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ClassModel.java index 012b0c20c5b..b4f2d9795ec 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ClassModel.java @@ -58,7 +58,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Client.java index 0e55d62d513..be3c219200f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Client.java @@ -57,7 +57,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Dog.java index 7d277b961a6..f82e824d2e4 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Dog.java @@ -59,7 +59,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/DogAllOf.java index 3c6d99afb75..62c3b196944 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -57,7 +57,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumArrays.java index 8b046bd53c3..8a54b50f522 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -133,7 +133,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -167,7 +166,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumTest.java index 8bac5511683..575a32ebce7 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/EnumTest.java @@ -218,7 +218,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -244,7 +243,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -270,7 +268,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -296,7 +293,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -323,7 +319,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 98648e87cf2..46c92718db4 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -64,7 +64,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -99,7 +98,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FormatTest.java index 097e3b816e6..81dbea7fbad 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/FormatTest.java @@ -116,7 +116,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -144,7 +143,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -170,7 +168,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -199,7 +196,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -227,7 +223,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -255,7 +250,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -281,7 +275,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -307,7 +300,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -334,7 +326,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -361,7 +352,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -388,7 +378,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -415,7 +404,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -441,7 +429,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -468,7 +455,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java index 891bed365c4..11d6be2d43d 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java @@ -116,7 +116,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -150,7 +149,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -184,7 +182,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b74ccaa2dd3..18c2179c708 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -72,7 +72,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -99,7 +98,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -134,7 +132,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Model200Response.java index 5d57eb6e251..5eb7788e917 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Model200Response.java @@ -62,7 +62,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -88,7 +87,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelApiResponse.java index ec257a9e3c7..16b0ac3a5ea 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -65,7 +65,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -91,7 +90,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -117,7 +115,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelReturn.java index 3bf61282d0d..e35698cbfa3 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -58,7 +58,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Name.java index 1cc42f664e4..885d7220817 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Name.java @@ -70,7 +70,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -112,7 +111,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/NumberOnly.java index 17217c202ce..73a24525692 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -59,7 +59,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Order.java index 6305ac84c00..c1f857ba7f1 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Order.java @@ -115,7 +115,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -141,7 +140,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -167,7 +165,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -220,7 +216,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -246,7 +241,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java index 0b0917bcef6..333de203a4f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -67,7 +67,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -93,7 +92,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -119,7 +117,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Pet.java index 1dcd2fee24a..4fdce22a0ca 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Pet.java @@ -118,7 +118,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -145,7 +144,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -171,7 +169,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -202,7 +199,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -237,7 +233,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -263,7 +258,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 3e4b5ee55df..a36a25c0510 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -77,7 +77,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/SpecialModelName.java index 2ef7431f0bc..eb40d707ada 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -57,7 +57,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Tag.java index e2153173c05..17edbc2edd9 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Tag.java @@ -61,7 +61,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 4660869ef5b..e6ddf531002 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -76,7 +76,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -103,7 +102,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -129,7 +127,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -155,7 +152,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -186,7 +182,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderExample.java index dba5a5d25aa..6c606c85a90 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -80,7 +80,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -107,7 +106,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -133,7 +131,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -159,7 +156,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -185,7 +181,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -216,7 +211,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/User.java index f46df9c9a93..7268eab0d6f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/User.java @@ -85,7 +85,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -111,7 +110,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -137,7 +135,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -163,7 +160,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -189,7 +185,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -215,7 +210,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -241,7 +235,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -267,7 +260,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/XmlItem.java index 98f99c4a514..458f927a896 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/XmlItem.java @@ -172,7 +172,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -199,7 +198,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -225,7 +223,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -251,7 +248,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -285,7 +281,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -311,7 +306,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -338,7 +332,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -364,7 +357,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -390,7 +382,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -424,7 +415,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -458,7 +448,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -484,7 +473,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -511,7 +499,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -537,7 +524,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -563,7 +549,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -597,7 +582,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -631,7 +615,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -657,7 +640,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -684,7 +666,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -710,7 +691,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -736,7 +716,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -770,7 +749,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -804,7 +782,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -830,7 +807,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -857,7 +833,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -883,7 +858,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -909,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -943,7 +916,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -977,7 +949,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 54d850abe3e..41ac622a4e4 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -101,7 +101,7 @@ ext { play_version = "2.5.14" swagger_annotations_version = "1.5.22" junit_version = "4.12" - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2-play25/build.sbt b/samples/client/petstore/java/retrofit2-play25/build.sbt index 0dd2611317c..46cbd0af51a 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.sbt +++ b/samples/client/petstore/java/retrofit2-play25/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" diff --git a/samples/client/petstore/java/retrofit2-play25/docs/ClassModel.md b/samples/client/petstore/java/retrofit2-play25/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play25/docs/Model200Response.md b/samples/client/petstore/java/retrofit2-play25/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play25/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2-play25/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play25/docs/Name.md b/samples/client/petstore/java/retrofit2-play25/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play25/pom.xml b/samples/client/petstore/java/retrofit2-play25/pom.xml index 7c072f8bd55..c78aec11c65 100644 --- a/samples/client/petstore/java/retrofit2-play25/pom.xml +++ b/samples/client/petstore/java/retrofit2-play25/pom.xml @@ -289,7 +289,7 @@ 2.5.15 0.2.0 2.5.0 - 1.3.8 + 1.4.0 1.0.1 4.12 diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/ApiClient.java index 13dfce951a2..a81407cfe5b 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/ApiClient.java @@ -61,13 +61,14 @@ public class ApiClient { } Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); List extraQueryParams = new ArrayList<>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } ObjectMapper mapper = Json.mapper(); @@ -78,7 +79,7 @@ public class ApiClient { .baseUrl(basePath) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(JacksonConverterFactory.create(mapper)) - .callFactory(new Play25CallFactory(wsClient, extraHeaders, extraQueryParams)) + .callFactory(new Play25CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams)) .addCallAdapterFactory(new Play25CallAdapterFactory()) .build() .create(serviceClass); @@ -139,5 +140,3 @@ public class ApiClient { } - - diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/Play25CallFactory.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/Play25CallFactory.java index d016b0eb090..412ba4b5aa0 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/Play25CallFactory.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/Play25CallFactory.java @@ -9,6 +9,7 @@ import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; import java.io.IOException; import java.net.MalformedURLException; @@ -32,9 +33,12 @@ public class Play25CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); - + /** Filters (interceptors) */ private List filters = new ArrayList<>(); @@ -48,10 +52,12 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } public Play25CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -62,6 +68,9 @@ public class Play25CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -143,6 +152,7 @@ public class Play25CallFactory implements okhttp3.Call.Factory { try { wsRequest = wsClient.url(request.url().uri().toString()); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -163,6 +173,19 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + final List cookies = request.headers("Cookie"); + if (!cookies.isEmpty()) { + String delimiter = ""; + final StringBuilder cookieHeader = new StringBuilder(); + for (final String cookie : cookies) { + cookieHeader.append(String.format("%s%s", delimiter, cookie)); + delimiter = "; "; + } + wsRequest.setHeader("Cookie", cookieHeader.toString()); + } + } + private void addBody(WSRequest wsRequest) throws IOException { Buffer buffer = new Buffer(); request.body().writeTo(buffer); @@ -198,12 +221,16 @@ public class Play25CallFactory implements okhttp3.Call.Factory { } }); - + for (Map.Entry> entry : r.getAllHeaders().entrySet()) { for (String value : entry.getValue()) { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } + builder.protocol(Protocol.HTTP_1_1); return builder.build(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index e9e52dcf796..809a01a9787 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -59,7 +59,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -73,6 +73,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 29ab38c51b9..0967f96bd1d 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index a9e1f16e700..9071c582806 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index ec4f41db591..8f134e614a8 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 91f163f405f..5bfa7d02c0f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -109,7 +109,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -144,7 +143,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -178,7 +176,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -212,7 +209,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -247,7 +243,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -282,7 +277,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -317,7 +311,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -352,7 +345,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -379,7 +371,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -406,7 +397,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -433,7 +423,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 9a8e56b6b81..94d4ece0c37 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 660ca6a4313..21088ae7434 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 9f24f09077b..58780e577cb 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 3978179bcf5..f3ece0e27ed 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java index 63f1aa5dec9..fa37d558448 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java @@ -69,7 +69,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -95,7 +94,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 483ba916ed5..93745951285 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 8753a7a8937..1658e715300 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayTest.java index 4df2dd31145..de001c2ec5e 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -76,7 +76,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -111,7 +110,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -146,7 +144,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Capitalization.java index 065d28841ca..28c74d28c02 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Capitalization.java @@ -77,7 +77,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -103,7 +102,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -129,7 +127,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -155,7 +152,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -181,7 +177,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -207,7 +202,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Cat.java index 8e87cb645ba..6bfe06bcafa 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Cat.java @@ -59,7 +59,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/CatAllOf.java index 30d9d8f4961..f62c8936adc 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -57,7 +57,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Category.java index 60ea5045dbc..35816bb041f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Category.java @@ -61,7 +61,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ClassModel.java index 012b0c20c5b..b4f2d9795ec 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ClassModel.java @@ -58,7 +58,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Client.java index 0e55d62d513..be3c219200f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Client.java @@ -57,7 +57,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Dog.java index 7d277b961a6..f82e824d2e4 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Dog.java @@ -59,7 +59,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/DogAllOf.java index 3c6d99afb75..62c3b196944 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -57,7 +57,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumArrays.java index 8b046bd53c3..8a54b50f522 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -133,7 +133,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -167,7 +166,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumTest.java index 8bac5511683..575a32ebce7 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/EnumTest.java @@ -218,7 +218,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -244,7 +243,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -270,7 +268,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -296,7 +293,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -323,7 +319,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 98648e87cf2..46c92718db4 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -64,7 +64,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -99,7 +98,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FormatTest.java index 7f75bcaa103..cbf0d392bb7 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/FormatTest.java @@ -116,7 +116,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -144,7 +143,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -170,7 +168,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -199,7 +196,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -227,7 +223,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -255,7 +250,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -281,7 +275,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -307,7 +300,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -334,7 +326,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -361,7 +352,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -388,7 +378,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -415,7 +404,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -441,7 +429,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -468,7 +455,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java index 891bed365c4..11d6be2d43d 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java @@ -116,7 +116,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -150,7 +149,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -184,7 +182,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e0930dc4011..28c4f00fe77 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -72,7 +72,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -99,7 +98,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -134,7 +132,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Model200Response.java index 5d57eb6e251..5eb7788e917 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Model200Response.java @@ -62,7 +62,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -88,7 +87,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelApiResponse.java index ec257a9e3c7..16b0ac3a5ea 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -65,7 +65,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -91,7 +90,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -117,7 +115,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelReturn.java index 3bf61282d0d..e35698cbfa3 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -58,7 +58,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Name.java index 1cc42f664e4..885d7220817 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Name.java @@ -70,7 +70,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -112,7 +111,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/NumberOnly.java index 17217c202ce..73a24525692 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -59,7 +59,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Order.java index 3554e9b139b..59510f49a72 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Order.java @@ -115,7 +115,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -141,7 +140,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -167,7 +165,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -220,7 +216,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -246,7 +241,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java index 0b0917bcef6..333de203a4f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -67,7 +67,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -93,7 +92,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -119,7 +117,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Pet.java index 1dcd2fee24a..4fdce22a0ca 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Pet.java @@ -118,7 +118,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -145,7 +144,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -171,7 +169,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -202,7 +199,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -237,7 +233,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -263,7 +258,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 3e4b5ee55df..a36a25c0510 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -77,7 +77,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/SpecialModelName.java index 2ef7431f0bc..eb40d707ada 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -57,7 +57,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Tag.java index e2153173c05..17edbc2edd9 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Tag.java @@ -61,7 +61,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 4660869ef5b..e6ddf531002 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -76,7 +76,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -103,7 +102,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -129,7 +127,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -155,7 +152,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -186,7 +182,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderExample.java index dba5a5d25aa..6c606c85a90 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -80,7 +80,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -107,7 +106,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -133,7 +131,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -159,7 +156,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -185,7 +181,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -216,7 +211,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/User.java index f46df9c9a93..7268eab0d6f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/User.java @@ -85,7 +85,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -111,7 +110,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -137,7 +135,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -163,7 +160,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -189,7 +185,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -215,7 +210,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -241,7 +235,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -267,7 +260,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/XmlItem.java index 98f99c4a514..458f927a896 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/XmlItem.java @@ -172,7 +172,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -199,7 +198,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -225,7 +223,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -251,7 +248,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -285,7 +281,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -311,7 +306,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -338,7 +332,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -364,7 +357,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -390,7 +382,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -424,7 +415,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -458,7 +448,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -484,7 +473,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -511,7 +499,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -537,7 +524,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -563,7 +549,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -597,7 +582,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -631,7 +615,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -657,7 +640,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -684,7 +666,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -710,7 +691,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -736,7 +716,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -770,7 +749,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -804,7 +782,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -830,7 +807,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -857,7 +833,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -883,7 +858,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -909,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -943,7 +916,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -977,7 +949,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 37bbbee850c..179857ed9f0 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -103,7 +103,7 @@ ext { play_version = "2.6.7" swagger_annotations_version = "1.5.22" junit_version = "4.12" - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2-play26/build.sbt b/samples/client/petstore/java/retrofit2-play26/build.sbt index 545688cf09e..ca10a8f59eb 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.sbt +++ b/samples/client/petstore/java/retrofit2-play26/build.sbt @@ -19,7 +19,7 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ClassModel.md b/samples/client/petstore/java/retrofit2-play26/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md b/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play26/docs/Name.md b/samples/client/petstore/java/retrofit2-play26/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/Name.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2-play26/pom.xml b/samples/client/petstore/java/retrofit2-play26/pom.xml index 5ba1a7f38a2..bd49c056813 100644 --- a/samples/client/petstore/java/retrofit2-play26/pom.xml +++ b/samples/client/petstore/java/retrofit2-play26/pom.xml @@ -294,7 +294,7 @@ 2.6.7 0.2.0 2.5.0 - 1.3.8 + 1.4.0 1.0.1 4.12 diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java index fdee9f1921f..25cee420370 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java @@ -74,17 +74,18 @@ public class ApiClient { } Map extraHeaders = new HashMap<>(); + Map extraCookies = new HashMap<>(); List extraQueryParams = new ArrayList<>(); for (String authName : authentications.keySet()) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(extraQueryParams, extraHeaders); + auth.applyToParams(extraQueryParams, extraHeaders, extraCookies); } if (callFactory == null) { - callFactory = new Play26CallFactory(wsClient, extraHeaders, extraQueryParams); + callFactory = new Play26CallFactory(wsClient, extraHeaders, extraCookies, extraQueryParams); } if (callAdapterFactory == null) { callAdapterFactory = new Play26CallAdapterFactory(); diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Play26CallFactory.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Play26CallFactory.java index 5b4a012a657..9052d14cefa 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Play26CallFactory.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/Play26CallFactory.java @@ -9,6 +9,8 @@ import play.libs.ws.WSClient; import play.libs.ws.WSRequest; import play.libs.ws.WSResponse; import play.libs.ws.WSRequestFilter; +import play.libs.ws.WSCookie; +import play.libs.ws.WSCookieBuilder; import java.io.IOException; import java.net.MalformedURLException; @@ -32,6 +34,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { /** Extra headers to add to request */ private Map extraHeaders = new HashMap<>(); + /** Extra cookies to add to request */ + private Map extraCookies = new HashMap<>(); + /** Extra query parameters to add to request */ private List extraQueryParams = new ArrayList<>(); @@ -51,10 +56,12 @@ public class Play26CallFactory implements okhttp3.Call.Factory { } public Play26CallFactory(WSClient wsClient, Map extraHeaders, + Map extraCookies, List extraQueryParams) { this.wsClient = wsClient; this.extraHeaders.putAll(extraHeaders); + this.extraCookies.putAll(extraCookies); this.extraQueryParams.addAll(extraQueryParams); } @@ -70,6 +77,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { for (Map.Entry header : this.extraHeaders.entrySet()) { rb.addHeader(header.getKey(), header.getValue()); } + for (Map.Entry cookie : this.extraCookies.entrySet()) { + rb.addHeader("Cookie", String.format("%s=%s", cookie.getKey(), cookie.getValue())); + } // add extra query params if (!this.extraQueryParams.isEmpty()) { @@ -160,6 +170,7 @@ public class Play26CallFactory implements okhttp3.Call.Factory { wsRequest.addQueryParameter(queryParam, url.queryParameter(queryParam)); }); addHeaders(wsRequest); + addCookies(wsRequest); if (request.body() != null) { addBody(wsRequest); } @@ -180,6 +191,32 @@ public class Play26CallFactory implements okhttp3.Call.Factory { } } + private void addCookies(WSRequest wsRequest) { + for (final WSCookie cookie : getCookies()) { + wsRequest.addCookie(cookie); + } + } + + List getCookies() { + final List cookies = new ArrayList<>(); + for (final String cookieString : request.headers("Cookie")) { + for (String cookie : cookieString.split(";")) { + cookie = cookie.trim(); + final String[] nameAndValue = cookie.split("="); + if (nameAndValue.length != 2) { + continue; + } + cookies.add( + new WSCookieBuilder() + .setName(nameAndValue[0]) + .setValue(nameAndValue[1]) + .build() + ); + } + } + return cookies; + } + private void addBody(WSRequest wsRequest) throws IOException { MediaType mediaType = request.body().contentType(); if (mediaType != null) { @@ -220,6 +257,9 @@ public class Play26CallFactory implements okhttp3.Call.Factory { builder.addHeader(entry.getKey(), value); } } + for (final WSCookie cookie : r.getCookies()) { + builder.addHeader("Cookie", String.format("%s=%s", cookie.getName(), cookie.getValue())); + } builder.message(r.getStatusText()); builder.protocol(Protocol.HTTP_1_1); diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index e9e52dcf796..809a01a9787 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -59,7 +59,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, Map headerParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } @@ -73,6 +73,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); } } } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/Authentication.java index ae096bbc69c..5c558b1d5ab 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, Map headerParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 29ab38c51b9..0967f96bd1d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index a9e1f16e700..9071c582806 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index ec4f41db591..8f134e614a8 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 91f163f405f..5bfa7d02c0f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -109,7 +109,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -144,7 +143,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -178,7 +176,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -212,7 +209,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -247,7 +243,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -282,7 +277,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -317,7 +311,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -352,7 +345,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -379,7 +371,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -406,7 +397,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -433,7 +423,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 9a8e56b6b81..94d4ece0c37 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 660ca6a4313..21088ae7434 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -60,7 +60,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 9f24f09077b..58780e577cb 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 3978179bcf5..f3ece0e27ed 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -59,7 +59,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java index 63f1aa5dec9..fa37d558448 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java @@ -69,7 +69,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -95,7 +94,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 483ba916ed5..93745951285 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 8753a7a8937..1658e715300 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -69,7 +69,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java index 4df2dd31145..de001c2ec5e 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -76,7 +76,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -111,7 +110,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -146,7 +144,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java index 065d28841ca..28c74d28c02 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java @@ -77,7 +77,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -103,7 +102,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -129,7 +127,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -155,7 +152,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -181,7 +177,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -207,7 +202,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java index 8e87cb645ba..6bfe06bcafa 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java @@ -59,7 +59,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java index 30d9d8f4961..f62c8936adc 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -57,7 +57,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java index 60ea5045dbc..35816bb041f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java @@ -61,7 +61,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java index 012b0c20c5b..b4f2d9795ec 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java @@ -58,7 +58,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java index 0e55d62d513..be3c219200f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java @@ -57,7 +57,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java index 7d277b961a6..f82e824d2e4 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java @@ -59,7 +59,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java index 3c6d99afb75..62c3b196944 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -57,7 +57,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java index 8b046bd53c3..8a54b50f522 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -133,7 +133,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -167,7 +166,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java index 8bac5511683..575a32ebce7 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java @@ -218,7 +218,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -244,7 +243,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -270,7 +268,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -296,7 +293,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -323,7 +319,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 98648e87cf2..46c92718db4 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -64,7 +64,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -99,7 +98,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java index 7f75bcaa103..cbf0d392bb7 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java @@ -116,7 +116,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -144,7 +143,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -170,7 +168,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -199,7 +196,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -227,7 +223,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -255,7 +250,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -281,7 +275,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -307,7 +300,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -334,7 +326,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -361,7 +352,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -388,7 +378,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -415,7 +404,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -441,7 +429,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -468,7 +455,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java index 891bed365c4..11d6be2d43d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java @@ -116,7 +116,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -150,7 +149,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -184,7 +182,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index e0930dc4011..28c4f00fe77 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -72,7 +72,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -99,7 +98,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -134,7 +132,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java index 5d57eb6e251..5eb7788e917 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java @@ -62,7 +62,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -88,7 +87,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java index ec257a9e3c7..16b0ac3a5ea 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -65,7 +65,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -91,7 +90,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -117,7 +115,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java index 3bf61282d0d..e35698cbfa3 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -58,7 +58,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java index 1cc42f664e4..885d7220817 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java @@ -70,7 +70,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -112,7 +111,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java index 17217c202ce..73a24525692 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -59,7 +59,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java index 3554e9b139b..59510f49a72 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java @@ -115,7 +115,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -141,7 +140,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -167,7 +165,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -220,7 +216,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -246,7 +241,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java index 0b0917bcef6..333de203a4f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -67,7 +67,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -93,7 +92,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -119,7 +117,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java index 1dcd2fee24a..4fdce22a0ca 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java @@ -118,7 +118,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -145,7 +144,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -171,7 +169,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -202,7 +199,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -237,7 +233,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -263,7 +258,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 3e4b5ee55df..a36a25c0510 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -77,7 +77,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java index 2ef7431f0bc..eb40d707ada 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -57,7 +57,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java index e2153173c05..17edbc2edd9 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java @@ -61,7 +61,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -87,7 +86,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 4660869ef5b..e6ddf531002 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -76,7 +76,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -103,7 +102,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -129,7 +127,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -155,7 +152,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -186,7 +182,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java index dba5a5d25aa..6c606c85a90 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -80,7 +80,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -107,7 +106,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -133,7 +131,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -159,7 +156,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -185,7 +181,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -216,7 +211,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java index f46df9c9a93..7268eab0d6f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java @@ -85,7 +85,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -111,7 +110,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -137,7 +135,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -163,7 +160,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -189,7 +185,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -215,7 +210,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -241,7 +235,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -267,7 +260,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java index 98f99c4a514..458f927a896 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java @@ -172,7 +172,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -199,7 +198,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -225,7 +223,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -251,7 +248,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -285,7 +281,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -311,7 +306,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -338,7 +332,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -364,7 +357,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -390,7 +382,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -424,7 +415,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -458,7 +448,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -484,7 +473,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -511,7 +499,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -537,7 +524,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -563,7 +549,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -597,7 +582,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -631,7 +615,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -657,7 +640,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -684,7 +666,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -710,7 +691,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -736,7 +716,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -770,7 +749,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -804,7 +782,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -830,7 +807,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -857,7 +833,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -883,7 +858,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -909,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -943,7 +916,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -977,7 +949,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2/build.gradle b/samples/client/petstore/java/retrofit2/build.gradle index fe7dc2edaf7..997a3fe860c 100644 --- a/samples/client/petstore/java/retrofit2/build.gradle +++ b/samples/client/petstore/java/retrofit2/build.gradle @@ -99,7 +99,7 @@ ext { retrofit_version = "2.3.0" swagger_annotations_version = "1.5.22" junit_version = "4.12" - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2/build.sbt b/samples/client/petstore/java/retrofit2/build.sbt index 32ae3006148..e8e82ccf59a 100644 --- a/samples/client/petstore/java/retrofit2/build.sbt +++ b/samples/client/petstore/java/retrofit2/build.sbt @@ -14,7 +14,7 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" diff --git a/samples/client/petstore/java/retrofit2/docs/ClassModel.md b/samples/client/petstore/java/retrofit2/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2/docs/Model200Response.md b/samples/client/petstore/java/retrofit2/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2/docs/Name.md b/samples/client/petstore/java/retrofit2/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2/pom.xml b/samples/client/petstore/java/retrofit2/pom.xml index c0d06591036..879e3abf6d2 100644 --- a/samples/client/petstore/java/retrofit2/pom.xml +++ b/samples/client/petstore/java/retrofit2/pom.xml @@ -249,7 +249,7 @@ 1.8.3 1.5.22 2.5.0 - 1.3.8 + 1.4.0 1.0.1 4.12 diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 01323fa2db2..7e631dd0fad 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java index 8829c547501..56c305ade13 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java index d20d19aa53f..dcd1a8e3b90 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java index b1ad2d012fb..5983420c81b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 815cf8d5e05..527853d7522 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java index 8b4c1c910b7..33d57e18bee 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java index 3db0e2e26c9..1efe43b234b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index e61b1492abc..978cdb6f78d 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java index bf0f4550ccb..878b1540ee7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java index 4fce3d5e1c0..ecfd0be1b31 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2rx/build.gradle b/samples/client/petstore/java/retrofit2rx/build.gradle index d7b5bd24e6b..484532d45c2 100644 --- a/samples/client/petstore/java/retrofit2rx/build.gradle +++ b/samples/client/petstore/java/retrofit2rx/build.gradle @@ -100,7 +100,7 @@ ext { swagger_annotations_version = "1.5.22" junit_version = "4.12" rx_java_version = "1.3.0" - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2rx/build.sbt b/samples/client/petstore/java/retrofit2rx/build.sbt index 1cabf93331f..106217f49fb 100644 --- a/samples/client/petstore/java/retrofit2rx/build.sbt +++ b/samples/client/petstore/java/retrofit2rx/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "io.reactivex" % "rxjava" % "1.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" diff --git a/samples/client/petstore/java/retrofit2rx/docs/ClassModel.md b/samples/client/petstore/java/retrofit2rx/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2rx/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md b/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx/docs/Name.md b/samples/client/petstore/java/retrofit2rx/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx/pom.xml b/samples/client/petstore/java/retrofit2rx/pom.xml index 88fe728d383..05fc235b4bb 100644 --- a/samples/client/petstore/java/retrofit2rx/pom.xml +++ b/samples/client/petstore/java/retrofit2rx/pom.xml @@ -260,7 +260,7 @@ 1.5.22 2.5.0 1.3.0 - 1.3.8 + 1.4.0 1.0.1 4.12 diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 01323fa2db2..7e631dd0fad 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java index 8829c547501..56c305ade13 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/CatAllOf.java index d20d19aa53f..dcd1a8e3b90 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java index b1ad2d012fb..5983420c81b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 815cf8d5e05..527853d7522 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java index 8b4c1c910b7..33d57e18bee 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java index 3db0e2e26c9..1efe43b234b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index e61b1492abc..978cdb6f78d 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderExample.java index bf0f4550ccb..878b1540ee7 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/XmlItem.java index 4fce3d5e1c0..ecfd0be1b31 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/retrofit2rx2/build.gradle b/samples/client/petstore/java/retrofit2rx2/build.gradle index 435c9f843e8..97c14f8bca1 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.gradle +++ b/samples/client/petstore/java/retrofit2rx2/build.gradle @@ -100,7 +100,7 @@ ext { swagger_annotations_version = "1.5.22" junit_version = "4.12" rx_java_version = "2.1.1" - threetenbp_version = "1.3.5" + threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2rx2/build.sbt b/samples/client/petstore/java/retrofit2rx2/build.sbt index fbdee2f1683..c4c8da53e7d 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.sbt +++ b/samples/client/petstore/java/retrofit2rx2/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md b/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md b/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx2/docs/Name.md b/samples/client/petstore/java/retrofit2rx2/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/Name.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/retrofit2rx2/pom.xml b/samples/client/petstore/java/retrofit2rx2/pom.xml index b4a58f9d587..4afe2a3971c 100644 --- a/samples/client/petstore/java/retrofit2rx2/pom.xml +++ b/samples/client/petstore/java/retrofit2rx2/pom.xml @@ -260,7 +260,7 @@ 1.5.22 2.5.0 2.1.1 - 1.3.8 + 1.4.0 1.0.1 4.12 diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 01323fa2db2..7e631dd0fad 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -62,6 +62,10 @@ public class ApiKeyAuth implements Interceptor { request = request.newBuilder() .addHeader(paramName, apiKey) .build(); + } else if ("cookie".equals(location)) { + request = request.newBuilder() + .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) + .build(); } return chain.proceed(request); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 13e761a8d9c..79c169543fd 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 17e320b0a95..e16ee861f89 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8a51fa9f778..29161b52aa1 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a4a797bb487..a067b01ec97 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -104,7 +104,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -136,7 +135,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -168,7 +166,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -200,7 +197,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -232,7 +228,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -264,7 +259,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -296,7 +290,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -328,7 +321,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -352,7 +344,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -376,7 +367,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -400,7 +390,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 4f2e3ef333e..3a15ed7cd97 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 80ce73d422b..9bc46e09991 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -55,7 +55,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index bc5cc81bf64..bd65f7791c5 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 2e9c0c7ffd9..cdb8afedaaf 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -54,7 +54,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java index dd6b313c58c..af469dda3f4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java @@ -59,7 +59,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -83,7 +82,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 1af52a3a988..a6dd760660d 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index eba8d40a289..487c539d3ba 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -63,7 +63,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java index 7ba0d8b77e0..7d66ce233fe 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -71,7 +71,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -103,7 +102,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -135,7 +133,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java index dc70cf2b597..d4fbec81c54 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -72,7 +72,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -96,7 +95,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -120,7 +118,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -144,7 +141,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -168,7 +164,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -192,7 +187,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java index 8829c547501..56c305ade13 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java @@ -54,7 +54,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java index d20d19aa53f..dcd1a8e3b90 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -52,7 +52,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java index f335f0b5217..4d07c3a1bef 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java @@ -56,7 +56,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -79,7 +78,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java index 83c30b802d4..8867bdd06bf 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java @@ -53,7 +53,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java index 192c0ce6e5b..25831260e09 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java @@ -52,7 +52,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java index 2f8a4652247..89c8b6aba99 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java @@ -54,7 +54,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java index 96610291473..b945c2c33db 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -52,7 +52,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java index bbb97598ea3..2512b4cf9d5 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -152,7 +152,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -184,7 +183,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java index c08e4f6239d..ccbbabaa9ba 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -261,7 +261,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -284,7 +283,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -308,7 +306,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -332,7 +329,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -356,7 +352,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 45ce4347b2d..f4a15cd5b7f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -58,7 +58,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -90,7 +89,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java index b1ad2d012fb..5983420c81b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -111,7 +111,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +136,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -161,7 +159,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -186,7 +183,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -212,7 +208,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -238,7 +233,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -262,7 +256,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -285,7 +278,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -309,7 +301,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -332,7 +323,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -356,7 +346,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -380,7 +369,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -403,7 +391,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -427,7 +414,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java index b19863fb993..7dc68b0ff00 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -154,7 +153,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -186,7 +184,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -218,7 +215,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 815cf8d5e05..527853d7522 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -66,7 +66,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -90,7 +89,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -122,7 +120,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java index 42a61d0d877..df3683dac78 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -57,7 +57,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -81,7 +80,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db323b17602..b9cf72823b2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -60,7 +60,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -84,7 +83,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -108,7 +106,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java index da9f1a20259..6e9714df977 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -53,7 +53,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java index f775f97b3f1..94117a9b0f4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java @@ -64,7 +64,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -102,7 +101,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java index 1a7bd689645..9a55d8aa615 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -53,7 +53,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java index 8b4c1c910b7..33d57e18bee 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -146,7 +145,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -170,7 +168,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -194,7 +191,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -218,7 +214,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -242,7 +237,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java index 3db0e2e26c9..1efe43b234b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -61,7 +61,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -85,7 +84,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -109,7 +107,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java index 643184ae4fc..e50743626b4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java @@ -125,7 +125,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -149,7 +148,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -172,7 +170,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -200,7 +197,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -232,7 +228,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -256,7 +251,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 2501babb56e..ed0244a3ca2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -70,7 +70,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4ff598a6cfc..3405d30ff61 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -52,7 +52,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java index 693247a2fd2..710e0fe54a4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java @@ -56,7 +56,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -80,7 +79,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index e61b1492abc..978cdb6f78d 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -70,7 +70,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -93,7 +92,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -116,7 +114,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -139,7 +136,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -167,7 +163,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java index bf0f4550ccb..878b1540ee7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -74,7 +74,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -97,7 +96,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -120,7 +118,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -143,7 +140,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -166,7 +162,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -194,7 +189,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java index 3760c07c592..d9111531781 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java @@ -80,7 +80,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -104,7 +103,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -128,7 +126,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -152,7 +149,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -176,7 +172,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -200,7 +195,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -224,7 +218,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -248,7 +241,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java index 4fce3d5e1c0..ecfd0be1b31 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java @@ -167,7 +167,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -191,7 +190,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -215,7 +213,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -239,7 +236,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -271,7 +267,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -295,7 +290,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -319,7 +313,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -343,7 +336,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -367,7 +359,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -399,7 +390,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -431,7 +421,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -455,7 +444,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -479,7 +467,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -503,7 +490,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -527,7 +513,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -559,7 +544,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -591,7 +575,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -615,7 +598,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -639,7 +621,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -663,7 +644,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -687,7 +667,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -719,7 +698,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -751,7 +729,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -775,7 +752,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -799,7 +775,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -823,7 +798,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -847,7 +821,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -879,7 +852,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -911,7 +883,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/vertx/docs/ClassModel.md b/samples/client/petstore/java/vertx/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/vertx/docs/ClassModel.md +++ b/samples/client/petstore/java/vertx/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/vertx/docs/Model200Response.md b/samples/client/petstore/java/vertx/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/vertx/docs/Model200Response.md +++ b/samples/client/petstore/java/vertx/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/vertx/docs/ModelReturn.md b/samples/client/petstore/java/vertx/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/vertx/docs/ModelReturn.md +++ b/samples/client/petstore/java/vertx/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/vertx/docs/Name.md b/samples/client/petstore/java/vertx/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/vertx/docs/Name.md +++ b/samples/client/petstore/java/vertx/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java index 84bad01a4ed..6e916abf3d1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java @@ -47,6 +47,7 @@ public class ApiClient { private final String identifier; private MultiMap defaultHeaders = MultiMap.caseInsensitiveMultiMap(); + private MultiMap defaultCookies = MultiMap.caseInsensitiveMultiMap(); private Map authentications; private String basePath = "http://petstore.swagger.io:80/v2"; private DateFormat dateFormat; @@ -145,6 +146,15 @@ public class ApiClient { return this; } + public MultiMap getDefaultCookies() { + return defaultHeaders; + } + + public ApiClient addDefaultCookie(String key, String value) { + defaultCookies.add(key, value); + return this; + } + /** * Get authentications (key: authentication name, value: authentication). * @@ -427,6 +437,7 @@ public class ApiClient { * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters + * @param cookieParams The cookie parameters * @param formParams The form parameters * @param accepts The request's Accept headers * @param contentTypes The request's Content-Type headers @@ -435,10 +446,10 @@ public class ApiClient { * @param resultHandler The asynchronous response handler */ public void invokeAPI(String path, String method, List queryParams, Object body, MultiMap headerParams, - Map formParams, String[] accepts, String[] contentTypes, String[] authNames, + MultiMap cookieParams, Map formParams, String[] accepts, String[] contentTypes, String[] authNames, TypeReference returnType, Handler> resultHandler) { - updateParamsForAuth(authNames, queryParams, headerParams); + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); if (accepts != null && accepts.length > 0) { headerParams.add(HttpHeaders.ACCEPT, selectHeaderAccept(accepts)); @@ -473,6 +484,9 @@ public class ApiClient { } }); + final MultiMap cookies = MultiMap.caseInsensitiveMultiMap().addAll(cookieParams).addAll(defaultCookies); + request.putHeader("Cookie", buildCookieHeader(cookies)); + Handler>> responseHandler = buildResponseHandler(returnType, resultHandler); if (body != null) { sendBody(request, responseHandler, body); @@ -485,6 +499,18 @@ public class ApiClient { } } + private String buildCookieHeader(MultiMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry entry : cookies.entries()) { + if (entry.getValue() != null) { + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue())); + delimiter = "; "; + } + } + return cookieValue.toString(); + } + /** * Sanitize filename by removing path. * e.g. ../../sun.gif becomes sun.gif @@ -615,11 +641,11 @@ public class ApiClient { * * @param authNames The authentications to apply */ - protected void updateParamsForAuth(String[] authNames, List queryParams, MultiMap headerParams) { + protected void updateParamsForAuth(String[] authNames, List queryParams, MultiMap headerParams, MultiMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java index b0e86cf140f..91467b9115a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java @@ -61,6 +61,9 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -69,6 +72,6 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 9b74239af41..1cf29ead09d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -69,6 +69,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -77,7 +80,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * @@ -97,6 +100,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -105,7 +111,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * @@ -125,6 +131,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -133,7 +142,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * @@ -153,6 +162,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -161,7 +173,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * @@ -181,6 +193,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -189,7 +204,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * @@ -215,6 +230,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -223,7 +241,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * @@ -257,6 +275,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -265,7 +286,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * To test \"client\" model @@ -291,6 +312,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -299,7 +323,7 @@ public class FakeApiImpl implements FakeApi { String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -356,6 +380,9 @@ public class FakeApiImpl implements FakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -378,7 +405,7 @@ if (paramCallback != null) localVarFormParams.put("callback", paramCallback); String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; String[] localVarAuthNames = new String[] { "http_basic_test" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * To test enum parameters @@ -413,6 +440,9 @@ if (paramCallback != null) localVarFormParams.put("callback", paramCallback); if (enumHeaderString != null) localVarHeaderParams.add("enum_header_string", apiClient.parameterToString(enumHeaderString)); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -423,7 +453,7 @@ if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormS String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Fake endpoint to test group parameters (optional) @@ -474,6 +504,9 @@ if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormS if (booleanGroup != null) localVarHeaderParams.add("boolean_group", apiClient.parameterToString(booleanGroup)); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -482,7 +515,7 @@ if (booleanGroup != null) String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * test inline additionalProperties @@ -508,6 +541,9 @@ if (booleanGroup != null) // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -516,7 +552,7 @@ if (booleanGroup != null) String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * test json serialization of form data @@ -549,6 +585,9 @@ if (booleanGroup != null) // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -559,7 +598,7 @@ if (param2 != null) localVarFormParams.put("param2", param2); String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * @@ -618,6 +657,9 @@ if (param2 != null) localVarFormParams.put("param2", param2); // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -626,6 +668,6 @@ if (param2 != null) localVarFormParams.put("param2", param2); String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java index ed9f0a88c71..c05b6c91c60 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java @@ -61,6 +61,9 @@ public class FakeClassnameTags123ApiImpl implements FakeClassnameTags123Api { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -69,6 +72,6 @@ public class FakeClassnameTags123ApiImpl implements FakeClassnameTags123Api { String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { "api_key_query" }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java index d9220599d66..545d14ebf2d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java @@ -63,6 +63,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -71,7 +74,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { "application/json", "application/xml" }; String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Deletes a pet @@ -100,6 +103,9 @@ public class PetApiImpl implements PetApi { if (apiKey != null) localVarHeaderParams.add("api_key", apiClient.parameterToString(apiKey)); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -108,7 +114,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Finds Pets by status @@ -135,6 +141,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -143,7 +152,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { "petstore_auth" }; TypeReference> localVarReturnType = new TypeReference>() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Finds Pets by tags @@ -170,6 +179,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -178,7 +190,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { "petstore_auth" }; TypeReference> localVarReturnType = new TypeReference>() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Find pet by ID @@ -204,6 +216,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -212,7 +227,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { "api_key" }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Update an existing pet @@ -238,6 +253,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -246,7 +264,7 @@ public class PetApiImpl implements PetApi { String[] localVarContentTypes = { "application/json", "application/xml" }; String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Updates a pet in the store with form data @@ -274,6 +292,9 @@ public class PetApiImpl implements PetApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -284,7 +305,7 @@ if (status != null) localVarFormParams.put("status", status); String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; String[] localVarAuthNames = new String[] { "petstore_auth" }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * uploads an image @@ -312,6 +333,9 @@ if (status != null) localVarFormParams.put("status", status); // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -322,7 +346,7 @@ if (file != null) localVarFormParams.put("file", file); String[] localVarContentTypes = { "multipart/form-data" }; String[] localVarAuthNames = new String[] { "petstore_auth" }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * uploads an image (required) @@ -356,6 +380,9 @@ if (file != null) localVarFormParams.put("file", file); // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -366,6 +393,6 @@ if (requiredFile != null) localVarFormParams.put("requiredFile", requiredFile); String[] localVarContentTypes = { "multipart/form-data" }; String[] localVarAuthNames = new String[] { "petstore_auth" }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java index f939ac8e40c..733b6549119 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java @@ -61,6 +61,9 @@ public class StoreApiImpl implements StoreApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -69,7 +72,7 @@ public class StoreApiImpl implements StoreApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Returns pet inventories by status @@ -88,6 +91,9 @@ public class StoreApiImpl implements StoreApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -96,7 +102,7 @@ public class StoreApiImpl implements StoreApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { "api_key" }; TypeReference> localVarReturnType = new TypeReference>() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Find purchase order by ID @@ -122,6 +128,9 @@ public class StoreApiImpl implements StoreApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -130,7 +139,7 @@ public class StoreApiImpl implements StoreApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Place an order for a pet @@ -156,6 +165,9 @@ public class StoreApiImpl implements StoreApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -164,6 +176,6 @@ public class StoreApiImpl implements StoreApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java index ad2cb4881cb..e0c9acdf4e0 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java @@ -61,6 +61,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -69,7 +72,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Creates list of users with given input array @@ -95,6 +98,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -103,7 +109,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Creates list of users with given input array @@ -129,6 +135,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -137,7 +146,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Delete user @@ -163,6 +172,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -171,7 +183,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Get user by user name @@ -197,6 +209,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -205,7 +220,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Logs user into the system @@ -240,6 +255,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -248,7 +266,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** * Logs out current logged in user session @@ -267,6 +285,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -275,7 +296,7 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } /** * Updated user @@ -308,6 +329,9 @@ public class UserApiImpl implements UserApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); @@ -316,6 +340,6 @@ public class UserApiImpl implements UserApi { String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index c54304250a2..7960d780f90 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -56,7 +56,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (apiKey == null) { return; } @@ -70,6 +70,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.add(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.add(paramName, value); } } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/Authentication.java index 63c8c5298ea..08b071ee036 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/Authentication.java @@ -24,6 +24,7 @@ public interface Authentication { * * @param queryParams List of query parameters * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters */ - void applyToParams(List queryParams, MultiMap headerParams); + void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index 0b57f3deeb3..c35e7646782 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -41,7 +41,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 88d68d4d177..029926d3fa1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -37,7 +37,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (bearerToken == null) { return; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/OAuth.java index 0c5ceb7b5b9..7c795721670 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/auth/OAuth.java @@ -31,7 +31,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(List queryParams, MultiMap headerParams) { + public void applyToParams(List queryParams, MultiMap headerParams, MultiMap cookieParams) { if (accessToken != null) { headerParams.add("Authorization", "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0b590e6f976..fa85ab77596 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 42cb666ee58..28d19953c34 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 183ed21ce31..5eeac9d8ac5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java index d18e80986aa..df57098053e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java index 16d4f8bc2ff..86526adb3fa 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8d9d9801c23..cfd62fbce62 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java index a527825f12d..9a7e8a9c976 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(AsyncFile binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java index 3f48b4f8a06..3e72350aa8b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 11037877807..07d314691a9 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java index ffea4083f90..ba4e395e94e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java index 30bd83db599..2df466732f7 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 85e9389c1ee..f79d7b6383a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 158636a401f..f15b107fd18 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java index da87f2d6830..b3fbdce31b9 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/webclient/docs/ClassModel.md b/samples/client/petstore/java/webclient/docs/ClassModel.md index fa6c9b6e3e6..d5453c20133 100644 --- a/samples/client/petstore/java/webclient/docs/ClassModel.md +++ b/samples/client/petstore/java/webclient/docs/ClassModel.md @@ -2,6 +2,7 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/webclient/docs/Model200Response.md b/samples/client/petstore/java/webclient/docs/Model200Response.md index e2b5738a692..f9928d70622 100644 --- a/samples/client/petstore/java/webclient/docs/Model200Response.md +++ b/samples/client/petstore/java/webclient/docs/Model200Response.md @@ -2,6 +2,7 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/webclient/docs/ModelReturn.md b/samples/client/petstore/java/webclient/docs/ModelReturn.md index 44dc3c0a35b..5005d4b7239 100644 --- a/samples/client/petstore/java/webclient/docs/ModelReturn.md +++ b/samples/client/petstore/java/webclient/docs/ModelReturn.md @@ -2,6 +2,7 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/webclient/docs/Name.md b/samples/client/petstore/java/webclient/docs/Name.md index 4bff2a937a0..b815a0b4c99 100644 --- a/samples/client/petstore/java/webclient/docs/Name.md +++ b/samples/client/petstore/java/webclient/docs/Name.md @@ -2,6 +2,7 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index d200a8d95e9..9dfd60e30f7 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -123,7 +123,7 @@ 1.5.22 5.0.7.RELEASE 2.9.10 - 2.9.10 + 2.9.10.1 0.2.0 4.12 3.1.8.RELEASE diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java index 6d7875d1c4a..efef2ba6047 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/ApiClient.java @@ -80,6 +80,7 @@ public class ApiClient { } private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); private String basePath = "http://petstore.swagger.io:80/v2"; @@ -294,6 +295,21 @@ public class ApiClient { return this; } + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + /** * Get the date format used to parse/format date parameters. * @return DateFormat format @@ -503,8 +519,8 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return The response body in chosen type */ - public Mono invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, formParams, accept, contentType, authNames); + public Mono invokeAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); return requestBuilder.retrieve().bodyToMono(returnType); } @@ -524,13 +540,13 @@ public class ApiClient { * @param returnType The return type into which to deserialize the response * @return The response body in chosen type */ - public Flux invokeFluxAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { - final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, formParams, accept, contentType, authNames); + public Flux invokeFluxAPI(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + final WebClient.RequestBodySpec requestBuilder = prepareRequest(path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames); return requestBuilder.retrieve().bodyToFlux(returnType); } - private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames) { - updateParamsForAuth(authNames, queryParams, headerParams); + private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames) { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path); if (queryParams != null) { @@ -559,6 +575,8 @@ public class ApiClient { addHeadersToRequest(headerParams, requestBuilder); addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); requestBuilder.body(selectBody(body, formParams, contentType)); return requestBuilder; @@ -580,20 +598,37 @@ public class ApiClient { } } + /** + * Add cookies to the request that is being built + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, WebClient.RequestBodySpec requestBuilder) { + for (Entry> entry : cookies.entrySet()) { + List values = entry.getValue(); + for(String value : values) { + if (value != null) { + requestBuilder.cookie(entry.getKey(), value); + } + } + } + } + /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams The query parameters * @param headerParams The header parameters + * @param cookieParams the cookie parameters */ - private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams) { + private void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RestClientException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams); + auth.applyToParams(queryParams, headerParams, cookieParams); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f5502089506..9584e60eb95 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -62,9 +62,10 @@ public class AnotherFakeApi { } String path = UriComponentsBuilder.fromPath("/another-fake/dummy").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -79,6 +80,6 @@ public class AnotherFakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index 958f88eb87a..1d88cf98c12 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -69,9 +69,10 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/create_xml_item").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -84,7 +85,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -98,9 +99,10 @@ public class FakeApi { Object postBody = body; String path = UriComponentsBuilder.fromPath("/fake/outer/boolean").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -113,7 +115,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -127,9 +129,10 @@ public class FakeApi { Object postBody = body; String path = UriComponentsBuilder.fromPath("/fake/outer/composite").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -142,7 +145,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -156,9 +159,10 @@ public class FakeApi { Object postBody = body; String path = UriComponentsBuilder.fromPath("/fake/outer/number").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -171,7 +175,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -185,9 +189,10 @@ public class FakeApi { Object postBody = body; String path = UriComponentsBuilder.fromPath("/fake/outer/string").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -200,7 +205,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -218,9 +223,10 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/body-with-file-schema").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -233,7 +239,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -257,11 +263,12 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/body-with-query-params").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query", query)); final String[] accepts = { }; @@ -274,7 +281,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test \"client\" model @@ -293,9 +300,10 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -310,7 +318,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -357,11 +365,12 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (integer != null) formParams.add("integer", integer); if (int32 != null) @@ -401,7 +410,7 @@ public class FakeApi { String[] authNames = new String[] { "http_basic_test" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * To test enum parameters @@ -422,21 +431,22 @@ public class FakeApi { Object postBody = null; String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_integer", enumQueryInteger)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_double", enumQueryDouble)); - + if (enumHeaderStringArray != null) headerParams.add("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); if (enumHeaderString != null) headerParams.add("enum_header_string", apiClient.parameterToString(enumHeaderString)); - + if (enumFormStringArray != null) formParams.add("enum_form_string_array", enumFormStringArray); if (enumFormString != null) @@ -452,7 +462,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Fake endpoint to test group parameters (optional) @@ -485,16 +495,17 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_string_group", requiredStringGroup)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "required_int64_group", requiredInt64Group)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_group", stringGroup)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "int64_group", int64Group)); - + if (requiredBooleanGroup != null) headerParams.add("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); if (booleanGroup != null) @@ -508,7 +519,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test inline additionalProperties @@ -526,9 +537,10 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/inline-additionalProperties").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -541,7 +553,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * test json serialization of form data @@ -565,11 +577,12 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/jsonFormData").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (param != null) formParams.add("param", param); if (param2 != null) @@ -585,7 +598,7 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * @@ -627,11 +640,12 @@ public class FakeApi { } String path = UriComponentsBuilder.fromPath("/fake/test-query-paramters").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil)); queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("space".toUpperCase(Locale.ROOT)), "http", http)); @@ -646,6 +660,6 @@ public class FakeApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 385b97559f5..2b52dd02f89 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -62,9 +62,10 @@ public class FakeClassnameTags123Api { } String path = UriComponentsBuilder.fromPath("/fake_classname_test").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -79,6 +80,6 @@ public class FakeClassnameTags123Api { String[] authNames = new String[] { "api_key_query" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java index 24140bcb0c8..e919dfb88fe 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/PetApi.java @@ -64,9 +64,10 @@ public class PetApi { } String path = UriComponentsBuilder.fromPath("/pet").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -79,7 +80,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Deletes a pet @@ -102,11 +103,12 @@ public class PetApi { final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); String path = UriComponentsBuilder.fromPath("/pet/{petId}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (apiKey != null) headerParams.add("api_key", apiClient.parameterToString(apiKey)); @@ -118,7 +120,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by status @@ -138,11 +140,12 @@ public class PetApi { } String path = UriComponentsBuilder.fromPath("/pet/findByStatus").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); final String[] accepts = { @@ -155,7 +158,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeFluxAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeFluxAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Finds Pets by tags @@ -175,11 +178,12 @@ public class PetApi { } String path = UriComponentsBuilder.fromPath("/pet/findByTags").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); final String[] accepts = { @@ -192,7 +196,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeFluxAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeFluxAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find pet by ID @@ -216,9 +220,10 @@ public class PetApi { final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); String path = UriComponentsBuilder.fromPath("/pet/{petId}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -231,7 +236,7 @@ public class PetApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Update an existing pet @@ -252,9 +257,10 @@ public class PetApi { } String path = UriComponentsBuilder.fromPath("/pet").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -267,7 +273,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updates a pet in the store with form data @@ -290,11 +296,12 @@ public class PetApi { final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); String path = UriComponentsBuilder.fromPath("/pet/{petId}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (name != null) formParams.add("name", name); if (status != null) @@ -310,7 +317,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image @@ -334,11 +341,12 @@ public class PetApi { final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImage").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); if (file != null) @@ -356,7 +364,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * uploads an image (required) @@ -385,11 +393,12 @@ public class PetApi { final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); String path = UriComponentsBuilder.fromPath("/fake/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + if (additionalMetadata != null) formParams.add("additionalMetadata", additionalMetadata); if (requiredFile != null) @@ -407,6 +416,6 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java index 17dc61fe685..efe7fd58f56 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -65,9 +65,10 @@ public class StoreApi { final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); String path = UriComponentsBuilder.fromPath("/store/order/{order_id}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -78,7 +79,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Returns pet inventories by status @@ -91,9 +92,10 @@ public class StoreApi { Object postBody = null; String path = UriComponentsBuilder.fromPath("/store/inventory").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -106,7 +108,7 @@ public class StoreApi { String[] authNames = new String[] { "api_key" }; ParameterizedTypeReference> returnType = new ParameterizedTypeReference>() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Find purchase order by ID @@ -130,9 +132,10 @@ public class StoreApi { final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); String path = UriComponentsBuilder.fromPath("/store/order/{order_id}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -145,7 +148,7 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Place an order for a pet @@ -165,9 +168,10 @@ public class StoreApi { } String path = UriComponentsBuilder.fromPath("/store/order").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -180,6 +184,6 @@ public class StoreApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java index 316dfe888f3..71f334484a7 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -61,9 +61,10 @@ public class UserApi { } String path = UriComponentsBuilder.fromPath("/user").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -74,7 +75,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -92,9 +93,10 @@ public class UserApi { } String path = UriComponentsBuilder.fromPath("/user/createWithArray").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -105,7 +107,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Creates list of users with given input array @@ -123,9 +125,10 @@ public class UserApi { } String path = UriComponentsBuilder.fromPath("/user/createWithList").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -136,7 +139,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Delete user @@ -158,9 +161,10 @@ public class UserApi { final Map uriVariables = new HashMap(); uriVariables.put("username", username); String path = UriComponentsBuilder.fromPath("/user/{username}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -171,7 +175,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Get user by user name @@ -195,9 +199,10 @@ public class UserApi { final Map uriVariables = new HashMap(); uriVariables.put("username", username); String path = UriComponentsBuilder.fromPath("/user/{username}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { @@ -210,7 +215,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs user into the system @@ -236,11 +241,12 @@ public class UserApi { } String path = UriComponentsBuilder.fromPath("/user/login").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); - + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password)); @@ -254,7 +260,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Logs out current logged in user session @@ -266,9 +272,10 @@ public class UserApi { Object postBody = null; String path = UriComponentsBuilder.fromPath("/user/logout").build().toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -279,7 +286,7 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** * Updated user @@ -307,9 +314,10 @@ public class UserApi { final Map uriVariables = new HashMap(); uriVariables.put("username", username); String path = UriComponentsBuilder.fromPath("/user/{username}").buildAndExpand(uriVariables).toUriString(); - + final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; @@ -320,6 +328,6 @@ public class UserApi { String[] authNames = new String[] { }; ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 49f3b7fb8a3..bbd04ba629d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -41,7 +41,7 @@ public class ApiKeyAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (apiKey == null) { return; } @@ -55,6 +55,8 @@ public class ApiKeyAuth implements Authentication { queryParams.add(paramName, value); } else if (location.equals("header")) { headerParams.add(paramName, value); - } + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } } } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/Authentication.java index 7320ba74894..4f9a14ebd7c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/Authentication.java @@ -4,10 +4,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; public interface Authentication { - /** + /** * Apply authentication settings to header and / or query parameters. - * @param queryParams The query parameters for the request + * @param queryParams The query parameters for the request * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request */ - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ca0caef260f..903582344d1 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -29,7 +29,7 @@ public class HttpBasicAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (username == null && password == null) { return; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 0b829a1765a..97ff24fcd69 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -25,7 +25,7 @@ public class HttpBearerAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (bearerToken == null) { return; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/OAuth.java index 9b7588ec14f..a1782cdb9e1 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/auth/OAuth.java @@ -16,7 +16,7 @@ public class OAuth implements Authentication { } @Override - public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { if (accessToken != null) { headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index d64c54a0c3c..0f1223c2bc6 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesAnyType extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8befdaf5841..c03535ab947 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesArray extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 0d3f3b57eec..4356a4f8c1e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesBoolean extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0b590e6f976..fa85ab77596 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public class AdditionalPropertiesClass { } - public void setMapString(Map mapString) { this.mapString = mapString; } @@ -141,7 +140,6 @@ public class AdditionalPropertiesClass { } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -175,7 +173,6 @@ public class AdditionalPropertiesClass { } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -209,7 +206,6 @@ public class AdditionalPropertiesClass { } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -243,7 +239,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -277,7 +272,6 @@ public class AdditionalPropertiesClass { } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -311,7 +305,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -345,7 +338,6 @@ public class AdditionalPropertiesClass { } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -371,7 +363,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -397,7 +388,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -423,7 +413,6 @@ public class AdditionalPropertiesClass { } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e8da68432a4..2426e7c974c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesInteger extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index b687c4a3d63..da407ccdc47 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -58,7 +58,6 @@ public class AdditionalPropertiesNumber extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 3b53f64f5ef..5e468870311 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesObject extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 25186b7689d..ed080254966 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -57,7 +57,6 @@ public class AdditionalPropertiesString extends HashMap { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java index 5adbea35179..ff1d1f941ae 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public class Animal { } - public void setClassName(String className) { this.className = className; } @@ -92,7 +91,6 @@ public class Animal { } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 42cb666ee58..28d19953c34 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfArrayOfNumberOnly { } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 183ed21ce31..5eeac9d8ac5 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -66,7 +66,6 @@ public class ArrayOfNumberOnly { } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java index d18e80986aa..df57098053e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -74,7 +74,6 @@ public class ArrayTest { } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -108,7 +107,6 @@ public class ArrayTest { } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -142,7 +140,6 @@ public class ArrayTest { } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java index 7f9a9421204..033e9788110 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public class Capitalization { } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -101,7 +100,6 @@ public class Capitalization { } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -127,7 +125,6 @@ public class Capitalization { } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -153,7 +150,6 @@ public class Capitalization { } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -179,7 +175,6 @@ public class Capitalization { } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -205,7 +200,6 @@ public class Capitalization { } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java index ce0cd907f1d..484725c76fe 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java @@ -57,7 +57,6 @@ public class Cat extends Animal { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java index cd1b9c7d0ef..3e7b991436a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -55,7 +55,6 @@ public class CatAllOf { } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java index 7dfa56ee687..868ba875074 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public class Category { } - public void setId(Long id) { this.id = id; } @@ -84,7 +83,6 @@ public class Category { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java index 5bf9e79f4c7..4de7664b26a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java @@ -56,7 +56,6 @@ public class ClassModel { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java index c3e7af6af84..02b0aac2247 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java @@ -55,7 +55,6 @@ public class Client { } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java index 7f4e9437f8a..78044654d50 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java @@ -57,7 +57,6 @@ public class Dog extends Animal { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java index 182ea0f394e..dd42595cf20 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -55,7 +55,6 @@ public class DogAllOf { } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java index 16d4f8bc2ff..86526adb3fa 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -131,7 +131,6 @@ public class EnumArrays { } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -165,7 +164,6 @@ public class EnumArrays { } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java index 0dee6d3e21e..51a1a645a10 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -216,7 +216,6 @@ public class EnumTest { } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -241,7 +240,6 @@ public class EnumTest { } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -267,7 +265,6 @@ public class EnumTest { } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -293,7 +290,6 @@ public class EnumTest { } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -319,7 +315,6 @@ public class EnumTest { } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8d9d9801c23..cfd62fbce62 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -61,7 +61,6 @@ public class FileSchemaTestClass { } - public void setFile(java.io.File file) { this.file = file; } @@ -95,7 +94,6 @@ public class FileSchemaTestClass { } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java index ac8809b98d9..72ed8740e4d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public class FormatTest { } - public void setInteger(Integer integer) { this.integer = integer; } @@ -142,7 +141,6 @@ public class FormatTest { } - public void setInt32(Integer int32) { this.int32 = int32; } @@ -168,7 +166,6 @@ public class FormatTest { } - public void setInt64(Long int64) { this.int64 = int64; } @@ -195,7 +192,6 @@ public class FormatTest { } - public void setNumber(BigDecimal number) { this.number = number; } @@ -223,7 +219,6 @@ public class FormatTest { } - public void setFloat(Float _float) { this._float = _float; } @@ -251,7 +246,6 @@ public class FormatTest { } - public void setDouble(Double _double) { this._double = _double; } @@ -277,7 +271,6 @@ public class FormatTest { } - public void setString(String string) { this.string = string; } @@ -302,7 +295,6 @@ public class FormatTest { } - public void setByte(byte[] _byte) { this._byte = _byte; } @@ -328,7 +320,6 @@ public class FormatTest { } - public void setBinary(File binary) { this.binary = binary; } @@ -353,7 +344,6 @@ public class FormatTest { } - public void setDate(LocalDate date) { this.date = date; } @@ -379,7 +369,6 @@ public class FormatTest { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -405,7 +394,6 @@ public class FormatTest { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -430,7 +418,6 @@ public class FormatTest { } - public void setPassword(String password) { this.password = password; } @@ -456,7 +443,6 @@ public class FormatTest { } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java index 3f48b4f8a06..3e72350aa8b 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java @@ -113,7 +113,6 @@ public class MapTest { } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -147,7 +146,6 @@ public class MapTest { } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -181,7 +179,6 @@ public class MapTest { } - public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -215,7 +212,6 @@ public class MapTest { } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 11037877807..07d314691a9 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -69,7 +69,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -95,7 +94,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -129,7 +127,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java index b50537b496b..dd99468a005 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java @@ -60,7 +60,6 @@ public class Model200Response { } - public void setName(Integer name) { this.name = name; } @@ -86,7 +85,6 @@ public class Model200Response { } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d3935236159..383cafdd3a5 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public class ModelApiResponse { } - public void setCode(Integer code) { this.code = code; } @@ -89,7 +88,6 @@ public class ModelApiResponse { } - public void setType(String type) { this.type = type; } @@ -115,7 +113,6 @@ public class ModelApiResponse { } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java index 6f66b80b2d1..b62e13a90a0 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -56,7 +56,6 @@ public class ModelReturn { } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java index e53996cb041..bd625c5f66f 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java @@ -67,7 +67,6 @@ public class Name { } - public void setName(Integer name) { this.name = name; } @@ -109,7 +108,6 @@ public class Name { } - public void setProperty(String property) { this.property = property; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java index f7f7722a99f..5ca72a169fe 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -56,7 +56,6 @@ public class NumberOnly { } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java index ffea4083f90..ba4e395e94e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java @@ -113,7 +113,6 @@ public class Order { } - public void setId(Long id) { this.id = id; } @@ -139,7 +138,6 @@ public class Order { } - public void setPetId(Long petId) { this.petId = petId; } @@ -165,7 +163,6 @@ public class Order { } - public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -191,7 +188,6 @@ public class Order { } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -217,7 +213,6 @@ public class Order { } - public void setStatus(StatusEnum status) { this.status = status; } @@ -243,7 +238,6 @@ public class Order { } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java index 3082797d36a..d4d9ac6ba11 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public class OuterComposite { } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -90,7 +89,6 @@ public class OuterComposite { } - public void setMyString(String myString) { this.myString = myString; } @@ -116,7 +114,6 @@ public class OuterComposite { } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java index 30bd83db599..2df466732f7 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java @@ -116,7 +116,6 @@ public class Pet { } - public void setId(Long id) { this.id = id; } @@ -142,7 +141,6 @@ public class Pet { } - public void setCategory(Category category) { this.category = category; } @@ -167,7 +165,6 @@ public class Pet { } - public void setName(String name) { this.name = name; } @@ -197,7 +194,6 @@ public class Pet { } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -231,7 +227,6 @@ public class Pet { } - public void setTags(List tags) { this.tags = tags; } @@ -257,7 +252,6 @@ public class Pet { } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 7317b779090..b3e58ef3d2c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -75,7 +75,6 @@ public class ReadOnlyFirst { } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java index f43fc00dda2..35ad3bf4699 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -55,7 +55,6 @@ public class SpecialModelName { } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java index f4b0cc056c9..a3ecb398faa 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public class Tag { } - public void setId(Long id) { this.id = id; } @@ -85,7 +84,6 @@ public class Tag { } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 85e9389c1ee..f79d7b6383a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -73,7 +73,6 @@ public class TypeHolderDefault { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -98,7 +97,6 @@ public class TypeHolderDefault { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -123,7 +121,6 @@ public class TypeHolderDefault { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -148,7 +145,6 @@ public class TypeHolderDefault { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -178,7 +174,6 @@ public class TypeHolderDefault { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 158636a401f..f15b107fd18 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -77,7 +77,6 @@ public class TypeHolderExample { } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -102,7 +101,6 @@ public class TypeHolderExample { } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -127,7 +125,6 @@ public class TypeHolderExample { } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -152,7 +149,6 @@ public class TypeHolderExample { } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -177,7 +173,6 @@ public class TypeHolderExample { } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -207,7 +202,6 @@ public class TypeHolderExample { } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java index da0fd2d1191..b7e74643dab 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public class User { } - public void setId(Long id) { this.id = id; } @@ -109,7 +108,6 @@ public class User { } - public void setUsername(String username) { this.username = username; } @@ -135,7 +133,6 @@ public class User { } - public void setFirstName(String firstName) { this.firstName = firstName; } @@ -161,7 +158,6 @@ public class User { } - public void setLastName(String lastName) { this.lastName = lastName; } @@ -187,7 +183,6 @@ public class User { } - public void setEmail(String email) { this.email = email; } @@ -213,7 +208,6 @@ public class User { } - public void setPassword(String password) { this.password = password; } @@ -239,7 +233,6 @@ public class User { } - public void setPhone(String phone) { this.phone = phone; } @@ -265,7 +258,6 @@ public class User { } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java index da87f2d6830..b3fbdce31b9 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/XmlItem.java @@ -170,7 +170,6 @@ public class XmlItem { } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -196,7 +195,6 @@ public class XmlItem { } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -222,7 +220,6 @@ public class XmlItem { } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -248,7 +245,6 @@ public class XmlItem { } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -282,7 +278,6 @@ public class XmlItem { } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -308,7 +303,6 @@ public class XmlItem { } - public void setNameString(String nameString) { this.nameString = nameString; } @@ -334,7 +328,6 @@ public class XmlItem { } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -360,7 +353,6 @@ public class XmlItem { } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -386,7 +378,6 @@ public class XmlItem { } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -420,7 +411,6 @@ public class XmlItem { } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -454,7 +444,6 @@ public class XmlItem { } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -480,7 +469,6 @@ public class XmlItem { } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -506,7 +494,6 @@ public class XmlItem { } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -532,7 +519,6 @@ public class XmlItem { } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -558,7 +544,6 @@ public class XmlItem { } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -592,7 +577,6 @@ public class XmlItem { } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -626,7 +610,6 @@ public class XmlItem { } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -652,7 +635,6 @@ public class XmlItem { } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -678,7 +660,6 @@ public class XmlItem { } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -704,7 +685,6 @@ public class XmlItem { } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -730,7 +710,6 @@ public class XmlItem { } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -764,7 +743,6 @@ public class XmlItem { } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -798,7 +776,6 @@ public class XmlItem { } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -824,7 +801,6 @@ public class XmlItem { } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -850,7 +826,6 @@ public class XmlItem { } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -876,7 +851,6 @@ public class XmlItem { } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -902,7 +876,6 @@ public class XmlItem { } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -936,7 +909,6 @@ public class XmlItem { } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -970,7 +942,6 @@ public class XmlItem { } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/javascript-es6/package.json b/samples/client/petstore/javascript-es6/package.json index 6a738bcf338..0032c37d477 100644 --- a/samples/client/petstore/javascript-es6/package.json +++ b/samples/client/petstore/javascript-es6/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "babel src -d dist", "prepack": "npm run build", - "test": "mocha --compilers js:@babel/register --recursive" + "test": "mocha --require @babel/register --recursive" }, "browser": { "fs": false diff --git a/samples/client/petstore/javascript-es6/src/ApiClient.js b/samples/client/petstore/javascript-es6/src/ApiClient.js index 90efc536343..5d266cc248c 100644 --- a/samples/client/petstore/javascript-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-es6/src/ApiClient.js @@ -362,7 +362,7 @@ class ApiClient { * @param {Array.} accepts An array of acceptable response MIME types. * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one + * @param {String} apiBasePath base path defined in the operation/path level to override the default one * @param {module:ApiClient~callApiCallback} callback The callback function. * @returns {Object} The SuperAgent request object. */ diff --git a/samples/client/petstore/javascript-promise-es6/package.json b/samples/client/petstore/javascript-promise-es6/package.json index 6a738bcf338..0032c37d477 100644 --- a/samples/client/petstore/javascript-promise-es6/package.json +++ b/samples/client/petstore/javascript-promise-es6/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "babel src -d dist", "prepack": "npm run build", - "test": "mocha --compilers js:@babel/register --recursive" + "test": "mocha --require @babel/register --recursive" }, "browser": { "fs": false diff --git a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js index 828ec6b5c9c..dc4ff806226 100644 --- a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js @@ -355,7 +355,7 @@ class ApiClient { * @param {Array.} accepts An array of acceptable response MIME types. * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one + * @param {String} apiBasePath base path defined in the operation/path level to override the default one * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. */ callApi(path, httpMethod, pathParams, @@ -447,10 +447,12 @@ class ApiClient { request.end((error, response) => { if (error) { var err = {}; - err.status = response.status; - err.statusText = response.statusText; - err.body = response.body; - err.response = response; + if (response) { + err.status = response.status; + err.statusText = response.statusText; + err.body = response.body; + err.response = response; + } err.error = error; reject(err); diff --git a/samples/client/petstore/kotlin-multiplatform/build.gradle b/samples/client/petstore/kotlin-multiplatform/build.gradle index c976992112f..47045bb577e 100644 --- a/samples/client/petstore/kotlin-multiplatform/build.gradle +++ b/samples/client/petstore/kotlin-multiplatform/build.gradle @@ -30,6 +30,7 @@ kotlin { jvm() iosArm64() { binaries { framework { freeCompilerArgs.add("-Xobjc-generics") } } } iosX64() { binaries { framework { freeCompilerArgs.add("-Xobjc-generics") } } } + js() sourceSets { commonMain { @@ -37,9 +38,9 @@ kotlin { implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serialization_version" - implementation "io.ktor:ktor-client-core:$ktor_version" - implementation "io.ktor:ktor-client-json:$ktor_version" - implementation "io.ktor:ktor-client-serialization:$ktor_version" + api "io.ktor:ktor-client-core:$ktor_version" + api "io.ktor:ktor-client-json:$ktor_version" + api "io.ktor:ktor-client-serialization:$ktor_version" } } @@ -57,9 +58,9 @@ kotlin { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version" - implementation "io.ktor:ktor-client-core-jvm:$ktor_version" - implementation "io.ktor:ktor-client-json-jvm:$ktor_version" - implementation "io.ktor:ktor-client-serialization-jvm:$ktor_version" + api "io.ktor:ktor-client-core-jvm:$ktor_version" + api "io.ktor:ktor-client-json-jvm:$ktor_version" + api "io.ktor:ktor-client-serialization-jvm:$ktor_version" } } @@ -77,7 +78,7 @@ kotlin { dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version" - implementation "io.ktor:ktor-client-ios:$ktor_version" + api "io.ktor:ktor-client-ios:$ktor_version" } } @@ -91,9 +92,9 @@ kotlin { iosArm64().compilations.main.defaultSourceSet { dependsOn iosMain dependencies { - implementation "io.ktor:ktor-client-ios-iosarm64:$ktor_version" - implementation "io.ktor:ktor-client-json-iosarm64:$ktor_version" - implementation "io.ktor:ktor-client-serialization-iosarm64:$ktor_version" + api "io.ktor:ktor-client-ios-iosarm64:$ktor_version" + api "io.ktor:ktor-client-json-iosarm64:$ktor_version" + api "io.ktor:ktor-client-serialization-iosarm64:$ktor_version" } } @@ -104,9 +105,31 @@ kotlin { iosX64().compilations.main.defaultSourceSet { dependsOn iosMain dependencies { - implementation "io.ktor:ktor-client-ios-iosx64:$ktor_version" - implementation "io.ktor:ktor-client-json-iosx64:$ktor_version" - implementation "io.ktor:ktor-client-serialization-iosx64:$ktor_version" + api "io.ktor:ktor-client-ios-iosx64:$ktor_version" + api "io.ktor:ktor-client-json-iosx64:$ktor_version" + api "io.ktor:ktor-client-serialization-iosx64:$ktor_version" + } + } + + jsMain { + dependsOn commonMain + dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutines_version" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serialization_version" + api "io.ktor:ktor-client-js:$ktor_version" + api "io.ktor:ktor-client-json-js:$ktor_version" + api "io.ktor:ktor-client-serialization-js:$ktor_version" + } + } + + jsTest { + dependsOn commonTest + dependencies { + implementation "io.ktor:ktor-client-mock-js:$ktor_version" + implementation "io.ktor:ktor-client-js:$ktor_version" + implementation "io.ktor:ktor-client-json:$ktor_version" + implementation "io.ktor:ktor-client-serialization-js:$ktor_version" } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/PetApi.kt index 59c49b3efdf..aa9c34a0dca 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/PetApi.kt @@ -46,6 +46,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( */ suspend fun addPet(body: Pet) : HttpResponse { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = body val localVariableQuery = mutableMapOf>() @@ -61,7 +63,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -76,6 +79,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( */ suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : HttpResponse { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -93,7 +98,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -107,6 +113,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( @Suppress("UNCHECKED_CAST") suspend fun findPetsByStatus(status: kotlin.Array) : HttpResponse> { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -124,7 +132,8 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor( return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap().map { value.toTypedArray() } } @@ -148,6 +157,8 @@ private class FindPetsByStatusResponse(val value: List) { @Suppress("UNCHECKED_CAST") suspend fun findPetsByTags(tags: kotlin.Array) : HttpResponse> { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -165,7 +176,8 @@ private class FindPetsByStatusResponse(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap().map { value.toTypedArray() } } @@ -189,6 +201,8 @@ private class FindPetsByTagsResponse(val value: List) { @Suppress("UNCHECKED_CAST") suspend fun getPetById(petId: kotlin.Long) : HttpResponse { + val localVariableAuthNames = listOf("api_key") + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -205,7 +219,8 @@ private class FindPetsByTagsResponse(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -218,6 +233,8 @@ private class FindPetsByTagsResponse(val value: List) { */ suspend fun updatePet(body: Pet) : HttpResponse { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = body val localVariableQuery = mutableMapOf>() @@ -233,7 +250,8 @@ private class FindPetsByTagsResponse(val value: List) { return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -249,6 +267,8 @@ private class FindPetsByTagsResponse(val value: List) { */ suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : HttpResponse { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = ParametersBuilder().also { name?.apply { it.append("name", name.toString()) } @@ -268,7 +288,8 @@ private class FindPetsByTagsResponse(val value: List) { return urlEncodedFormRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -284,6 +305,8 @@ private class FindPetsByTagsResponse(val value: List) { @Suppress("UNCHECKED_CAST") suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: io.ktor.client.request.forms.InputProvider?) : HttpResponse { + val localVariableAuthNames = listOf("petstore_auth") + val localVariableBody = formData { additionalMetadata?.apply { append("additionalMetadata", additionalMetadata) } @@ -303,7 +326,8 @@ private class FindPetsByTagsResponse(val value: List) { return multipartFormRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt index 86f32c9f978..56a581d3725 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -45,6 +45,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor( */ suspend fun deleteOrder(orderId: kotlin.String) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -61,7 +63,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor( return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -74,6 +77,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor( @Suppress("UNCHECKED_CAST") suspend fun getInventory() : HttpResponse> { + val localVariableAuthNames = listOf("api_key") + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -90,7 +95,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor( return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap().map { value } } @@ -114,6 +120,8 @@ private class GetInventoryResponse(val value: Map) { @Suppress("UNCHECKED_CAST") suspend fun getOrderById(orderId: kotlin.Long) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -130,7 +138,8 @@ private class GetInventoryResponse(val value: Map) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -144,6 +153,8 @@ private class GetInventoryResponse(val value: Map) { @Suppress("UNCHECKED_CAST") suspend fun placeOrder(body: Order) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = body val localVariableQuery = mutableMapOf>() @@ -159,7 +170,8 @@ private class GetInventoryResponse(val value: Map) { return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/UserApi.kt index 1977979c1d9..6786d3d3f33 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/UserApi.kt @@ -45,6 +45,8 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor( */ suspend fun createUser(body: User) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = body val localVariableQuery = mutableMapOf>() @@ -60,7 +62,8 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor( return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -74,6 +77,8 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor( */ suspend fun createUsersWithArrayInput(body: kotlin.Array) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = CreateUsersWithArrayInputRequest(body.asList()) val localVariableQuery = mutableMapOf>() @@ -89,7 +94,8 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor( return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -112,6 +118,8 @@ private class CreateUsersWithArrayInputRequest(val value: List) { */ suspend fun createUsersWithListInput(body: kotlin.Array) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = CreateUsersWithListInputRequest(body.asList()) val localVariableQuery = mutableMapOf>() @@ -127,7 +135,8 @@ private class CreateUsersWithArrayInputRequest(val value: List) { return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -150,6 +159,8 @@ private class CreateUsersWithListInputRequest(val value: List) { */ suspend fun deleteUser(username: kotlin.String) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -166,7 +177,8 @@ private class CreateUsersWithListInputRequest(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -180,6 +192,8 @@ private class CreateUsersWithListInputRequest(val value: List) { @Suppress("UNCHECKED_CAST") suspend fun getUserByName(username: kotlin.String) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -196,7 +210,8 @@ private class CreateUsersWithListInputRequest(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -211,6 +226,8 @@ private class CreateUsersWithListInputRequest(val value: List) { @Suppress("UNCHECKED_CAST") suspend fun loginUser(username: kotlin.String, password: kotlin.String) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -229,7 +246,8 @@ private class CreateUsersWithListInputRequest(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -241,6 +259,8 @@ private class CreateUsersWithListInputRequest(val value: List) { */ suspend fun logoutUser() : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = io.ktor.client.utils.EmptyContent @@ -257,7 +277,8 @@ private class CreateUsersWithListInputRequest(val value: List) { return request( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } @@ -271,6 +292,8 @@ private class CreateUsersWithListInputRequest(val value: List) { */ suspend fun updateUser(username: kotlin.String, body: User) : HttpResponse { + val localVariableAuthNames = listOf() + val localVariableBody = body val localVariableQuery = mutableMapOf>() @@ -286,7 +309,8 @@ private class CreateUsersWithListInputRequest(val value: List) { return jsonRequest( localVariableConfig, - localVariableBody + localVariableBody, + localVariableAuthNames ).wrap() } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt new file mode 100644 index 00000000000..8bd8b59a8f8 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt @@ -0,0 +1,16 @@ +package org.openapitools.client.auth + +class ApiKeyAuth(private val location: String, val paramName: String) : Authentication { + var apiKey: String? = null + var apiKeyPrefix: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val key: String = apiKey ?: return + val prefix: String? = apiKeyPrefix + val value: String = if (prefix != null) "$prefix $key" else key + when (location) { + "query" -> query[paramName] = listOf(value) + "header" -> headers[paramName] = value + } + } +} diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/Authentication.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/Authentication.kt new file mode 100644 index 00000000000..2c5dfb4acc5 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/Authentication.kt @@ -0,0 +1,13 @@ +package org.openapitools.client.auth + +interface Authentication { + + /** + * Apply authentication settings to header and query params. + * + * @param query Query parameters. + * @param headers Header parameters. + */ + fun apply(query: MutableMap>, headers: MutableMap) + +} diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt new file mode 100644 index 00000000000..5f0a52c1951 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -0,0 +1,17 @@ +package org.openapitools.client.auth + +import io.ktor.util.InternalAPI +import io.ktor.util.encodeBase64 + +class HttpBasicAuth : Authentication { + var username: String? = null + var password: String? = null + + @InternalAPI + override fun apply(query: MutableMap>, headers: MutableMap) { + if (username == null && password == null) return + val str = (username ?: "") + ":" + (password ?: "") + val auth = str.encodeBase64() + headers["Authorization"] = "Basic $auth" + } +} diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBearerAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBearerAuth.kt new file mode 100644 index 00000000000..a6fb285af5c --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBearerAuth.kt @@ -0,0 +1,14 @@ +package org.openapitools.client.auth + +class HttpBearerAuth(private val scheme: String?) : Authentication { + var bearerToken: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val token: String = bearerToken ?: return + headers["Authorization"] = (if (scheme != null) upperCaseBearer(scheme)!! + " " else "") + token + } + + private fun upperCaseBearer(scheme: String): String? { + return if ("bearer".equals(scheme, ignoreCase = true)) "Bearer" else scheme + } +} diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt new file mode 100644 index 00000000000..08b289c2944 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt @@ -0,0 +1,10 @@ +package org.openapitools.client.auth + +class OAuth : Authentication { + var accessToken: String? = null + + override fun apply(query: MutableMap>, headers: MutableMap) { + val token: String = accessToken ?: return + headers["Authorization"] = "Bearer $token" + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index f97cb88d233..ef7a8f1e1a6 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 66a5140d254..2257d47739c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -23,6 +23,7 @@ import kotlinx.serialization.json.JsonConfiguration import org.openapitools.client.apis.* import org.openapitools.client.models.* +import org.openapitools.client.auth.* open class ApiClient( private val baseUrl: String, @@ -46,6 +47,12 @@ open class ApiClient( httpClientEngine?.let { HttpClient(it, clientConfig) } ?: HttpClient(clientConfig) } + private val authentications: kotlin.collections.Map by lazy { + mapOf( + "api_key" to ApiKeyAuth("header", "api_key"), + "petstore_auth" to OAuth()) + } + companion object { protected val UNSAFE_HEADERS = listOf(HttpHeaders.ContentType) @@ -57,31 +64,100 @@ open class ApiClient( UserApi.setMappers(serializer) - serializer.setMapper(ApiResponse::class, ApiResponse.serializer()) - serializer.setMapper(Category::class, Category.serializer()) - serializer.setMapper(Order::class, Order.serializer()) - serializer.setMapper(Pet::class, Pet.serializer()) - serializer.setMapper(Tag::class, Tag.serializer()) - serializer.setMapper(User::class, User.serializer()) + serializer.setMapper(org.openapitools.client.models.ApiResponse::class, org.openapitools.client.models.ApiResponse.serializer()) + serializer.setMapper(org.openapitools.client.models.Category::class, org.openapitools.client.models.Category.serializer()) + serializer.setMapper(org.openapitools.client.models.Order::class, org.openapitools.client.models.Order.serializer()) + serializer.setMapper(org.openapitools.client.models.Pet::class, org.openapitools.client.models.Pet.serializer()) + serializer.setMapper(org.openapitools.client.models.Tag::class, org.openapitools.client.models.Tag.serializer()) + serializer.setMapper(org.openapitools.client.models.User::class, org.openapitools.client.models.User.serializer()) } } - protected suspend fun multipartFormRequest(requestConfig: RequestConfig, body: List?): HttpResponse { - return request(requestConfig, MultiPartFormDataContent(body ?: listOf())) + /** + * Set the username for the first HTTP basic authentication. + * + * @param username Username + */ + fun setUsername(username: String) { + val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + ?: throw Exception("No HTTP basic authentication configured") + auth.username = username } - protected suspend fun urlEncodedFormRequest(requestConfig: RequestConfig, body: Parameters?): HttpResponse { - return request(requestConfig, FormDataContent(body ?: Parameters.Empty)) + /** + * Set the password for the first HTTP basic authentication. + * + * @param password Password + */ + fun setPassword(password: String) { + val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + ?: throw Exception("No HTTP basic authentication configured") + auth.password = password } - protected suspend fun jsonRequest(requestConfig: RequestConfig, body: Any? = null): HttpResponse { + /** + * Set the API key value for the first API key authentication. + * + * @param apiKey API key + * @param paramName The name of the API key parameter, or null or set the first key. + */ + fun setApiKey(apiKey: String, paramName: String? = null) { + val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + ?: throw Exception("No API key authentication configured") + auth.apiKey = apiKey + } + + /** + * Set the API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @param paramName The name of the API key parameter, or null or set the first key. + */ + fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { + val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + ?: throw Exception("No API key authentication configured") + auth.apiKeyPrefix = apiKeyPrefix + } + + /** + * Set the access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + fun setAccessToken(accessToken: String) { + val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + ?: throw Exception("No OAuth2 authentication configured") + auth.accessToken = accessToken + } + + /** + * Set the access token for the first Bearer authentication. + * + * @param bearerToken The bearer token. + */ + fun setBearerToken(bearerToken: String) { + val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + ?: throw Exception("No Bearer authentication configured") + auth.bearerToken = bearerToken + } + + protected suspend fun multipartFormRequest(requestConfig: RequestConfig, body: kotlin.collections.List?, authNames: kotlin.collections.List): HttpResponse { + return request(requestConfig, MultiPartFormDataContent(body ?: listOf()), authNames) + } + + protected suspend fun urlEncodedFormRequest(requestConfig: RequestConfig, body: Parameters?, authNames: kotlin.collections.List): HttpResponse { + return request(requestConfig, FormDataContent(body ?: Parameters.Empty), authNames) + } + + protected suspend fun jsonRequest(requestConfig: RequestConfig, body: Any? = null, authNames: kotlin.collections.List): HttpResponse { val contentType = (requestConfig.headers[HttpHeaders.ContentType]?.let { ContentType.parse(it) } ?: ContentType.Application.Json) - return if (body != null) request(requestConfig, serializer.write(body, contentType)) - else request(requestConfig) + return if (body != null) request(requestConfig, serializer.write(body, contentType), authNames) + else request(requestConfig, authNames = authNames) } - protected suspend fun request(requestConfig: RequestConfig, body: OutgoingContent = EmptyContent): HttpResponse { + protected suspend fun request(requestConfig: RequestConfig, body: OutgoingContent = EmptyContent, authNames: kotlin.collections.List): HttpResponse { + requestConfig.updateForAuth(authNames) val headers = requestConfig.headers return client.call { @@ -102,7 +178,14 @@ open class ApiClient( }.response } - private fun URLBuilder.appendPath(components: List): URLBuilder = apply { + private fun RequestConfig.updateForAuth(authNames: kotlin.collections.List) { + for (authName in authNames) { + val auth = authentications[authName] ?: throw Exception("Authentication undefined: $authName") + auth.apply(query, headers) + } + } + + private fun URLBuilder.appendPath(components: kotlin.collections.List): URLBuilder = apply { encodedPath = encodedPath.trimEnd('/') + components.joinToString("/", prefix = "/") { it.encodeURLQueryComponent() } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt new file mode 100644 index 00000000000..4bc1197cf00 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -0,0 +1,29 @@ +package org.openapitools.client.infrastructure + +import kotlinx.serialization.* +import kotlinx.serialization.internal.StringDescriptor + +@Serializable +class Base64ByteArray(val value: ByteArray) { + @Serializer(Base64ByteArray::class) + companion object : KSerializer { + override val descriptor = StringDescriptor.withName("Base64ByteArray") + override fun serialize(encoder: Encoder, obj: Base64ByteArray) = encoder.encodeString(obj.value.encodeBase64()) + override fun deserialize(decoder: Decoder) = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this::class != other::class) return false + other as Base64ByteArray + return value.contentEquals(other.value) + } + + override fun hashCode(): Int { + return value.contentHashCode() + } + + override fun toString(): String { + return "Base64ByteArray(${hex(value)})" + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt new file mode 100644 index 00000000000..8a222416cf2 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt @@ -0,0 +1,102 @@ +package org.openapitools.client.infrastructure + +import kotlinx.io.core.* +import kotlin.experimental.and + +private val digits = "0123456789abcdef".toCharArray() +private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" +private const val BASE64_MASK: Byte = 0x3f +private const val BASE64_PAD = '=' +private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } + +private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } +private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } +private fun Int.toBase64(): Char = BASE64_ALPHABET[this] +private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK +internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() +internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeStringUtf8(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes() + +/** + * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. + * + * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt + */ +internal fun hex(bytes: ByteArray): String { + val result = CharArray(bytes.size * 2) + var resultIndex = 0 + val digits = digits + + for (element in bytes) { + val b = element.toInt() and 0xff + result[resultIndex++] = digits[b shr 4] + result[resultIndex++] = digits[b and 0x0f] + } + + return String(result) +} + +/** + * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. + * + * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt + */ +internal fun hex(s: String): ByteArray { + val result = ByteArray(s.length / 2) + for (idx in result.indices) { + val srcIdx = idx * 2 + val high = s[srcIdx].toString().toInt(16) shl 4 + val low = s[srcIdx + 1].toString().toInt(16) + result[idx] = (high or low).toByte() + } + + return result +} + +/** + * Encode [ByteReadPacket] in base64 format. + * + * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt + */ +private fun ByteReadPacket.encodeBase64(): String = buildString { + val data = ByteArray(3) + while (remaining > 0) { + val read = readAvailable(data) + data.clearFrom(read) + + val padSize = (data.size - read) * 8 / 6 + val chunk = ((data[0].toInt() and 0xFF) shl 16) or + ((data[1].toInt() and 0xFF) shl 8) or + (data[2].toInt() and 0xFF) + + for (index in data.size downTo padSize) { + val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() + append(char.toBase64()) + } + + repeat(padSize) { append(BASE64_PAD) } + } +} + +/** + * Decode [ByteReadPacket] from base64 format + * + * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt + */ +private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { + val data = ByteArray(4) + + while (remaining > 0) { + val read = readAvailable(data) + + val chunk = data.foldIndexed(0) { index, result, current -> + result or (current.fromBase64().toInt() shl ((3 - index) * 6)) + } + + for (index in data.size - 2 downTo (data.size - read)) { + val origin = (chunk shr (8 * index)) and 0xff + writeByte(origin.toByte()) + } + } +} + + diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt new file mode 100644 index 00000000000..735e4e6e3f6 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -0,0 +1,29 @@ +package org.openapitools.client.infrastructure + +import kotlinx.serialization.* +import kotlinx.serialization.internal.StringDescriptor + +@Serializable +class OctetByteArray(val value: ByteArray) { + @Serializer(OctetByteArray::class) + companion object : KSerializer { + override val descriptor = StringDescriptor.withName("OctetByteArray") + override fun serialize(encoder: Encoder, obj: OctetByteArray) = encoder.encodeString(hex(obj.value)) + override fun deserialize(decoder: Decoder) = OctetByteArray(hex(decoder.decodeString())) + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this::class != other::class) return false + other as OctetByteArray + return value.contentEquals(other.value) + } + + override fun hashCode(): Int { + return value.contentHashCode() + } + + override fun toString(): String { + return "OctetByteArray(${hex(value)})" + } +} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 53e689237d7..9c22257e223 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 7cf06b85d50..e6cdd21a006 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -46,7 +46,7 @@ data class Order ( approved("approved"), delivered("delivered"); - object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray()) + object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value.toString() }.toTypedArray()) } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt index 180c5ff98e6..3ac5ce7bb12 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt @@ -48,7 +48,7 @@ data class Pet ( pending("pending"), sold("sold"); - object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray()) + object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value.toString() }.toTypedArray()) } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt new file mode 100644 index 00000000000..2bea4861f67 --- /dev/null +++ b/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt @@ -0,0 +1,7 @@ +package util + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.promise + +actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index c3a2c7076fa..d168f1d8bda 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index ea0bccdd44e..edce99a2128 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -33,10 +33,14 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -64,10 +68,14 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * @param petId Pet id to delete * @param apiKey (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -94,11 +102,18 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -125,11 +140,18 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -156,11 +178,15 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * Returns a single pet * @param petId ID of pet to return * @return Pet + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -187,10 +213,14 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -219,10 +249,14 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -251,11 +285,15 @@ internal class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index e2bf37917fe..46b6b316d95 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -32,10 +32,14 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2 * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -61,11 +65,15 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2 * Returns pet inventories by status * Returns a map of status codes to quantities * @return kotlin.collections.Map + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -92,11 +100,15 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2 * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -123,11 +135,15 @@ internal class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2 * * @param body order placed for purchasing the pet * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 18506d2a276..4b289be0dcd 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -32,10 +32,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * This can only be done by the logged in user. * @param body Created user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -62,10 +66,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -92,10 +100,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -122,10 +134,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * This can only be done by the logged in user. * @param username The name that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -152,11 +168,15 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * * @param username The name that needs to be fetched. Use user1 for testing. * @return User + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -184,11 +204,19 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * @param username The user name for login * @param password The password for login in clear text * @return kotlin.String + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -214,10 +242,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * Logs out current logged in user session * * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -245,10 +277,14 @@ internal class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2" * @param username name that need to be deleted * @param body Updated user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index b85d18def78..6f180df2254 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> internal fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 7a82f3eef2d..3b6246b9ee4 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -83,7 +83,9 @@ internal open class ApiClient(val baseUrl: String) { } } if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 14b306918fc..3e87d2c30f9 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ internal data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index c3a2c7076fa..d168f1d8bda 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 15f63f2a1b5..bc3e77dbf5f 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -33,10 +33,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -64,10 +68,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param petId Pet id to delete * @param apiKey (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -94,11 +102,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -125,11 +140,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -156,11 +178,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Returns a single pet * @param petId ID of pet to return * @return Pet + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -187,10 +213,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -219,10 +249,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -251,11 +285,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90d681f8f34..086f39cc5e7 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -32,10 +32,14 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -61,11 +65,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * Returns pet inventories by status * Returns a map of status codes to quantities * @return kotlin.collections.Map + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -92,11 +100,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -123,11 +135,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * * @param body order placed for purchasing the pet * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index daaaeae3150..0e22814d9de 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -32,10 +32,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param body Created user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -62,10 +66,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -92,10 +100,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -122,10 +134,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param username The name that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -152,11 +168,15 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param username The name that needs to be fetched. Use user1 for testing. * @return User + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -184,11 +204,19 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username The user name for login * @param password The password for login in clear text * @return kotlin.String + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -214,10 +242,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * Logs out current logged in user session * * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -245,10 +277,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username name that need to be deleted * @param body Updated user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index f97cb88d233..ef7a8f1e1a6 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3c5a60ccd30..3eb74d9ddfc 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -81,7 +81,9 @@ open class ApiClient(val baseUrl: String) { } } if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 53e689237d7..9c22257e223 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 15f63f2a1b5..bc3e77dbf5f 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -33,10 +33,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -64,10 +68,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param petId Pet id to delete * @param apiKey (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -94,11 +102,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -125,11 +140,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -156,11 +178,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Returns a single pet * @param petId ID of pet to return * @return Pet + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -187,10 +213,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -219,10 +249,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -251,11 +285,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90d681f8f34..086f39cc5e7 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -32,10 +32,14 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -61,11 +65,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * Returns pet inventories by status * Returns a map of status codes to quantities * @return kotlin.collections.Map + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -92,11 +100,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -123,11 +135,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * * @param body order placed for purchasing the pet * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index daaaeae3150..0e22814d9de 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -32,10 +32,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param body Created user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -62,10 +66,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -92,10 +100,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -122,10 +134,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param username The name that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -152,11 +168,15 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param username The name that needs to be fetched. Use user1 for testing. * @return User + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -184,11 +204,19 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username The user name for login * @param password The password for login in clear text * @return kotlin.String + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -214,10 +242,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * Logs out current logged in user session * * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -245,10 +277,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username name that need to be deleted * @param body Updated user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index f97cb88d233..ef7a8f1e1a6 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3df0d806a91..443c18a8353 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -83,7 +83,9 @@ open class ApiClient(val baseUrl: String) { } } if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 53e689237d7..9c22257e223 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index 9cd18f3a5fc..6ec6192162b 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -33,6 +33,6 @@ dependencies { compile "com.squareup.moshi:moshi-kotlin:1.8.0" compile "com.squareup.moshi:moshi-adapters:1.8.0" compile "com.squareup.okhttp3:okhttp:4.2.0" - compile "org.threeten:threetenbp:1.3.8" + compile "org.threeten:threetenbp:1.4.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 15f63f2a1b5..bc3e77dbf5f 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -33,10 +33,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -64,10 +68,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param petId Pet id to delete * @param apiKey (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -94,11 +102,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -125,11 +140,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -156,11 +178,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Returns a single pet * @param petId ID of pet to return * @return Pet + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -187,10 +213,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -219,10 +249,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -251,11 +285,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90d681f8f34..086f39cc5e7 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -32,10 +32,14 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -61,11 +65,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * Returns pet inventories by status * Returns a map of status codes to quantities * @return kotlin.collections.Map + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -92,11 +100,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -123,11 +135,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * * @param body order placed for purchasing the pet * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index daaaeae3150..0e22814d9de 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -32,10 +32,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param body Created user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -62,10 +66,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -92,10 +100,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -122,10 +134,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param username The name that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -152,11 +168,15 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param username The name that needs to be fetched. Use user1 for testing. * @return User + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -184,11 +204,19 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username The user name for login * @param password The password for login in clear text * @return kotlin.String + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -214,10 +242,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * Logs out current logged in user session * * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -245,10 +277,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username name that need to be deleted * @param body Updated user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index f97cb88d233..ef7a8f1e1a6 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3df0d806a91..443c18a8353 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -83,7 +83,9 @@ open class ApiClient(val baseUrl: String) { } } if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 53e689237d7..9c22257e223 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 15f63f2a1b5..bc3e77dbf5f 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -33,10 +33,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -64,10 +68,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param petId Pet id to delete * @param apiKey (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -94,11 +102,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("status" to toMultiValue(status.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -125,11 +140,18 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by * @return kotlin.Array + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByTags(tags: kotlin.Array) : kotlin.Array { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("tags" to toMultiValue(tags.toList(), "csv")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -156,11 +178,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * Returns a single pet * @param petId ID of pet to return * @return Pet + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -187,10 +213,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * * @param body Pet object that needs to be added to the store * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -219,10 +249,14 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = mapOf("name" to "$name", "status" to "$status") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -251,11 +285,15 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) * @return ApiResponse + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to "$additionalMetadata", "file" to "$file") - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90d681f8f34..086f39cc5e7 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -32,10 +32,14 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -61,11 +65,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * Returns pet inventories by status * Returns a map of status codes to quantities * @return kotlin.collections.Map + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -92,11 +100,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -123,11 +135,15 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC * * @param body order placed for purchasing the pet * @return Order + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index daaaeae3150..0e22814d9de 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -32,10 +32,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param body Created user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -62,10 +66,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -92,10 +100,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param body List of user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.Array) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -122,10 +134,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * This can only be done by the logged in user. * @param username The name that needs to be deleted * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -152,11 +168,15 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * * @param username The name that needs to be fetched. Use user1 for testing. * @return User + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -184,11 +204,19 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username The user name for login * @param password The password for login in clear text * @return kotlin.String + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ @Suppress("UNCHECKED_CAST") + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf("username" to listOf("$username"), "password" to listOf("$password")) + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -214,10 +242,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * Logs out current logged in user session * * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.GET, @@ -245,10 +277,14 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl * @param username name that need to be deleted * @param body Updated user object * @return void + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response */ + @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() + val localVariableQuery: MultiValueMap = mutableMapOf() val localVariableHeaders: MutableMap = mutableMapOf() val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt index f97cb88d233..ef7a8f1e1a6 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt @@ -1,12 +1,12 @@ package org.openapitools.client.infrastructure -typealias MultiValueMap = Map> +typealias MultiValueMap = MutableMap> fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { "csv" -> "," "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " + "pipe" -> "|" + "space" -> " " else -> "" } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3df0d806a91..443c18a8353 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -83,7 +83,9 @@ open class ApiClient(val baseUrl: String) { } } if (requestConfig.headers[Authorization].isNullOrEmpty()) { - requestConfig.headers[Authorization] = "Bearer " + accessToken + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer " + accessToken + } } } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 53e689237d7..9c22257e223 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,5 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: Map> = mapOf() + val query: MutableMap> = mutableMapOf() ) \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/docs/ClassModel.md b/samples/client/petstore/python-asyncio/docs/ClassModel.md index 7f6f6d17211..657d51a944d 100644 --- a/samples/client/petstore/python-asyncio/docs/ClassModel.md +++ b/samples/client/petstore/python-asyncio/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/File.md b/samples/client/petstore/python-asyncio/docs/File.md index 6a925f0a7af..f17ba0057d0 100644 --- a/samples/client/petstore/python-asyncio/docs/File.md +++ b/samples/client/petstore/python-asyncio/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/Model200Response.md b/samples/client/petstore/python-asyncio/docs/Model200Response.md index 30f47cae521..40d0d7828e1 100644 --- a/samples/client/petstore/python-asyncio/docs/Model200Response.md +++ b/samples/client/petstore/python-asyncio/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/ModelReturn.md b/samples/client/petstore/python-asyncio/docs/ModelReturn.md index 2b03798e301..65ec73ddae7 100644 --- a/samples/client/petstore/python-asyncio/docs/ModelReturn.md +++ b/samples/client/petstore/python-asyncio/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/Name.md b/samples/client/petstore/python-asyncio/docs/Name.md index 17dc7a38fe6..807b76afc6e 100644 --- a/samples/client/petstore/python-asyncio/docs/Name.md +++ b/samples/client/petstore/python-asyncio/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index 0405206d982..9ad41e84f6d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -287,7 +288,7 @@ class ApiClient(object): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -340,18 +341,19 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - return thread + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -577,7 +579,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -587,7 +588,7 @@ class ApiClient(object): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -596,7 +597,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py index 8bc62757860..0df679d29f4 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py @@ -32,6 +32,8 @@ class EnumClass(object): _EFG = "-efg" _XYZ_ = "(xyz)" + allowable_values = [_ABC, _EFG, _XYZ_] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py index 8fbfeb7aaea..bcea632b3f5 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py @@ -32,6 +32,8 @@ class OuterEnum(object): APPROVED = "approved" DELIVERED = "delivered" + allowable_values = [PLACED, APPROVED, DELIVERED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python-asyncio/requirements.txt b/samples/client/petstore/python-asyncio/requirements.txt index bafdc07532f..eb358efd5bd 100644 --- a/samples/client/petstore/python-asyncio/requirements.txt +++ b/samples/client/petstore/python-asyncio/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/samples/client/petstore/python-asyncio/setup.py b/samples/client/petstore/python-asyncio/setup.py index bf6cb115fc6..beeac0aae7f 100644 --- a/samples/client/petstore/python-asyncio/setup.py +++ b/samples/client/petstore/python-asyncio/setup.py @@ -28,12 +28,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md index 9843d35ab90..754b2f3ada4 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md index cfe09d91c72..61ac566c14d 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesBoolean.md index 74f009554a7..f2567f064cf 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesBoolean.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **bool** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index f1f9b29a608..1a379bff6f0 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**map_string** | **dict(str, str)** | | [optional] -**map_number** | **dict(str, float)** | | [optional] -**map_integer** | **dict(str, int)** | | [optional] -**map_boolean** | **dict(str, bool)** | | [optional] -**map_array_integer** | **dict(str, list[int])** | | [optional] -**map_array_anytype** | **dict(str, list[object])** | | [optional] -**map_map_string** | **dict(str, dict(str, str))** | | [optional] -**map_map_anytype** | **dict(str, dict(str, object))** | | [optional] -**anytype_1** | [**object**](.md) | | [optional] -**anytype_2** | [**object**](.md) | | [optional] -**anytype_3** | [**object**](.md) | | [optional] +**map_string** | **{str: (str,)}** | | [optional] +**map_number** | **{str: (float,)}** | | [optional] +**map_integer** | **{str: (int,)}** | | [optional] +**map_boolean** | **{str: (bool,)}** | | [optional] +**map_array_integer** | **{str: ([int],)}** | | [optional] +**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional] +**map_map_string** | **{str: ({str: (str,)},)}** | | [optional] +**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional] +**anytype_1** | [**bool, date, datetime, dict, float, int, list, str**](.md) | | [optional] +**anytype_2** | [**bool, date, datetime, dict, float, int, list, str**](.md) | | [optional] +**anytype_3** | [**bool, date, datetime, dict, float, int, list, str**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesInteger.md index a3e58fd1b0b..fe0ba709c8e 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesInteger.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **int** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesNumber.md index 37eafe1ff03..bec81854b95 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesNumber.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **float** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md index 7f4d6713c75..3fcf2c9299d 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesString.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesString.md index 9317cfeee80..bbe0b1cbbbb 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesString.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] +**any string name** | **str** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md index aa3988ab167..1a68df0090b 100644 --- a/samples/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/python-experimental/docs/ArrayOfArrayOfNumberOnly.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**array_array_number** | **list[list[float]]** | | [optional] +**array_array_number** | **[[float]]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md b/samples/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md index 2c3de967aec..b8a760f56dc 100644 --- a/samples/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/python-experimental/docs/ArrayOfNumberOnly.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**array_number** | **list[float]** | | [optional] +**array_number** | **[float]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ArrayTest.md b/samples/client/petstore/python-experimental/docs/ArrayTest.md index 6ab0d137806..c677e324ad4 100644 --- a/samples/client/petstore/python-experimental/docs/ArrayTest.md +++ b/samples/client/petstore/python-experimental/docs/ArrayTest.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**array_of_string** | **list[str]** | | [optional] -**array_array_of_integer** | **list[list[int]]** | | [optional] -**array_array_of_model** | **list[list[ReadOnlyFirst]]** | | [optional] +**array_of_string** | **[str]** | | [optional] +**array_array_of_integer** | **[[int]]** | | [optional] +**array_array_of_model** | **[[ReadOnlyFirst]]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ClassModel.md b/samples/client/petstore/python-experimental/docs/ClassModel.md index 7f6f6d17211..657d51a944d 100644 --- a/samples/client/petstore/python-experimental/docs/ClassModel.md +++ b/samples/client/petstore/python-experimental/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/EnumArrays.md b/samples/client/petstore/python-experimental/docs/EnumArrays.md index e15a5f1fd04..e0b5582e9d5 100644 --- a/samples/client/petstore/python-experimental/docs/EnumArrays.md +++ b/samples/client/petstore/python-experimental/docs/EnumArrays.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **just_symbol** | **str** | | [optional] -**array_enum** | **list[str]** | | [optional] +**array_enum** | **[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/FakeApi.md b/samples/client/petstore/python-experimental/docs/FakeApi.md index 94280a71234..0677687d592 100644 --- a/samples/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/client/petstore/python-experimental/docs/FakeApi.md @@ -591,7 +591,7 @@ int32 = 56 # int | None (optional) int64 = 56 # int | None (optional) float = 3.4 # float | None (optional) string = 'string_example' # str | None (optional) -binary = '/path/to/file' # file | None (optional) +binary = open('/path/to/file', 'rb') # file_type | None (optional) date = '2013-10-20' # date | None (optional) date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) @@ -617,7 +617,7 @@ Name | Type | Description | Notes **int64** | **int**| None | [optional] **float** | **float**| None | [optional] **string** | **str**| None | [optional] - **binary** | **file**| None | [optional] + **binary** | **file_type**| None | [optional] **date** | **date**| None | [optional] **date_time** | **datetime**| None | [optional] **password** | **str**| None | [optional] @@ -662,13 +662,13 @@ from pprint import pprint # Create an instance of the API class api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) +enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') -enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional) +enum_query_string_array = ['enum_query_string_array_example'] # [str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') enum_query_integer = 56 # int | Query parameter enum test (double) (optional) enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) -enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') +enum_form_string_array = '$' # [str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') try: @@ -682,13 +682,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enum_header_string_array** | [**list[str]**](str.md)| Header parameter enum test (string array) | [optional] + **enum_header_string_array** | [**[str]**](str.md)| Header parameter enum test (string array) | [optional] **enum_header_string** | **str**| Header parameter enum test (string) | [optional] if omitted the server will use the default value of '-efg' - **enum_query_string_array** | [**list[str]**](str.md)| Query parameter enum test (string array) | [optional] + **enum_query_string_array** | [**[str]**](str.md)| Query parameter enum test (string array) | [optional] **enum_query_string** | **str**| Query parameter enum test (string) | [optional] if omitted the server will use the default value of '-efg' **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **float**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | [**list[str]**](str.md)| Form parameter enum test (string array) | [optional] if omitted the server will use the default value of '$' + **enum_form_string_array** | [**[str]**](str.md)| Form parameter enum test (string array) | [optional] if omitted the server will use the default value of '$' **enum_form_string** | **str**| Form parameter enum test (string) | [optional] if omitted the server will use the default value of '-efg' ### Return type @@ -791,7 +791,7 @@ from pprint import pprint # Create an instance of the API class api_instance = petstore_api.FakeApi() -param = {'key': 'param_example'} # dict(str, str) | request body +param = {'key': 'param_example'} # {str: (str,)} | request body try: # test inline additionalProperties @@ -804,7 +804,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **param** | [**dict(str, str)**](str.md)| request body | + **param** | [**{str: (str,)}**](str.md)| request body | ### Return type diff --git a/samples/client/petstore/python-experimental/docs/File.md b/samples/client/petstore/python-experimental/docs/File.md index 6a925f0a7af..f17ba0057d0 100644 --- a/samples/client/petstore/python-experimental/docs/File.md +++ b/samples/client/petstore/python-experimental/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/FileSchemaTestClass.md b/samples/client/petstore/python-experimental/docs/FileSchemaTestClass.md index dc372228988..d0a8bbaaba9 100644 --- a/samples/client/petstore/python-experimental/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/python-experimental/docs/FileSchemaTestClass.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **file** | [**File**](File.md) | | [optional] -**files** | [**list[File]**](File.md) | | [optional] +**files** | [**[File]**](File.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/FormatTest.md b/samples/client/petstore/python-experimental/docs/FormatTest.md index 1bf152e6828..083b0bd4c98 100644 --- a/samples/client/petstore/python-experimental/docs/FormatTest.md +++ b/samples/client/petstore/python-experimental/docs/FormatTest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **float** | **float** | | [optional] **double** | **float** | | [optional] **string** | **str** | | [optional] -**binary** | **file** | | [optional] +**binary** | **file_type** | | [optional] **date_time** | **datetime** | | [optional] **uuid** | **str** | | [optional] diff --git a/samples/client/petstore/python-experimental/docs/MapTest.md b/samples/client/petstore/python-experimental/docs/MapTest.md index ee6036eb2f4..ad561b7220b 100644 --- a/samples/client/petstore/python-experimental/docs/MapTest.md +++ b/samples/client/petstore/python-experimental/docs/MapTest.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**map_map_of_string** | **dict(str, dict(str, str))** | | [optional] -**map_of_enum_string** | **dict(str, str)** | | [optional] -**direct_map** | **dict(str, bool)** | | [optional] +**map_map_of_string** | **{str: ({str: (str,)},)}** | | [optional] +**map_of_enum_string** | **{str: (str,)}** | | [optional] +**direct_map** | **{str: (bool,)}** | | [optional] **indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md index b9808d5275e..1484c0638d8 100644 --- a/samples/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **str** | | [optional] **date_time** | **datetime** | | [optional] -**map** | [**dict(str, Animal)**](Animal.md) | | [optional] +**map** | [**{str: (Animal,)}**](Animal.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Model200Response.md b/samples/client/petstore/python-experimental/docs/Model200Response.md index 30f47cae521..40d0d7828e1 100644 --- a/samples/client/petstore/python-experimental/docs/Model200Response.md +++ b/samples/client/petstore/python-experimental/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/ModelReturn.md b/samples/client/petstore/python-experimental/docs/ModelReturn.md index 2b03798e301..65ec73ddae7 100644 --- a/samples/client/petstore/python-experimental/docs/ModelReturn.md +++ b/samples/client/petstore/python-experimental/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/Name.md b/samples/client/petstore/python-experimental/docs/Name.md index 17dc7a38fe6..807b76afc6e 100644 --- a/samples/client/petstore/python-experimental/docs/Name.md +++ b/samples/client/petstore/python-experimental/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/Pet.md b/samples/client/petstore/python-experimental/docs/Pet.md index 15185316fea..ce09d401c89 100644 --- a/samples/client/petstore/python-experimental/docs/Pet.md +++ b/samples/client/petstore/python-experimental/docs/Pet.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | -**photo_urls** | **list[str]** | | +**photo_urls** | **[str]** | | **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] -**tags** | [**list[Tag]**](Tag.md) | | [optional] +**tags** | [**[Tag]**](Tag.md) | | [optional] **status** | **str** | pet status in the store | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/PetApi.md b/samples/client/petstore/python-experimental/docs/PetApi.md index cda559d0c62..8364f8fa8fc 100644 --- a/samples/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/client/petstore/python-experimental/docs/PetApi.md @@ -134,7 +134,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **find_pets_by_status** -> list[Pet] find_pets_by_status(status) +> [Pet] find_pets_by_status(status) Finds Pets by status @@ -157,7 +157,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' configuration.host = "http://petstore.swagger.io:80/v2" # Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # list[str] | Status values that need to be considered for filter +status = ['status_example'] # [str] | Status values that need to be considered for filter try: # Finds Pets by status @@ -171,11 +171,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**list[str]**](str.md)| Status values that need to be considered for filter | + **status** | [**[str]**](str.md)| Status values that need to be considered for filter | ### Return type -[**list[Pet]**](Pet.md) +[**[Pet]**](Pet.md) ### Authorization @@ -195,7 +195,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **find_pets_by_tags** -> list[Pet] find_pets_by_tags(tags) +> [Pet] find_pets_by_tags(tags) Finds Pets by tags @@ -218,7 +218,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' configuration.host = "http://petstore.swagger.io:80/v2" # Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # list[str] | Tags to filter by +tags = ['tags_example'] # [str] | Tags to filter by try: # Finds Pets by tags @@ -232,11 +232,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**list[str]**](str.md)| Tags to filter by | + **tags** | [**[str]**](str.md)| Tags to filter by | ### Return type -[**list[Pet]**](Pet.md) +[**[Pet]**](Pet.md) ### Authorization @@ -464,11 +464,12 @@ configuration.host = "http://petstore.swagger.io:80/v2" api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) -file = '/path/to/file' # file | file to upload (optional) +file = open('/path/to/file', 'rb') # file_type | file to upload (optional) +files = open('/path/to/file', 'rb') # [file_type] | files to upload (optional) try: # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file, files=files) pprint(api_response) except ApiException as e: print("Exception when calling PetApi->upload_file: %s\n" % e) @@ -480,7 +481,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pet_id** | **int**| ID of pet to update | **additional_metadata** | **str**| Additional data to pass to server | [optional] - **file** | **file**| file to upload | [optional] + **file** | **file_type**| file to upload | [optional] + **files** | [**[file_type]**](file_type.md)| files to upload | [optional] ### Return type @@ -525,7 +527,7 @@ configuration.host = "http://petstore.swagger.io:80/v2" # Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update -required_file = '/path/to/file' # file | file to upload +required_file = open('/path/to/file', 'rb') # file_type | file to upload additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) try: @@ -541,7 +543,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pet_id** | **int**| ID of pet to update | - **required_file** | **file**| file to upload | + **required_file** | **file_type**| file to upload | **additional_metadata** | **str**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/client/petstore/python-experimental/docs/StoreApi.md b/samples/client/petstore/python-experimental/docs/StoreApi.md index 8c49f326222..bc010729c4e 100644 --- a/samples/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/client/petstore/python-experimental/docs/StoreApi.md @@ -65,7 +65,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_inventory** -> dict(str, int) get_inventory() +> {str: (int,)} get_inventory() Returns pet inventories by status @@ -104,7 +104,7 @@ This endpoint does not need any parameter. ### Return type -**dict(str, int)** +**{str: (int,)}** ### Authorization diff --git a/samples/client/petstore/python-experimental/docs/StringBooleanMap.md b/samples/client/petstore/python-experimental/docs/StringBooleanMap.md index 7abf11ec68b..2fbf3b3767d 100644 --- a/samples/client/petstore/python-experimental/docs/StringBooleanMap.md +++ b/samples/client/petstore/python-experimental/docs/StringBooleanMap.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**any string name** | **bool** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md b/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md index 7ec864de09d..21d125a8e5f 100644 --- a/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md +++ b/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md @@ -1,9 +1,10 @@ # TypeHolderDefault +a model to test optional properties with server defaults ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**array_item** | **list[int]** | | +**array_item** | **[int]** | | **string_item** | **str** | | defaults to 'what' **number_item** | **float** | | defaults to 1.234 **integer_item** | **int** | | defaults to -2 diff --git a/samples/client/petstore/python-experimental/docs/TypeHolderExample.md b/samples/client/petstore/python-experimental/docs/TypeHolderExample.md index 71f302f8d9f..b74c520d447 100644 --- a/samples/client/petstore/python-experimental/docs/TypeHolderExample.md +++ b/samples/client/petstore/python-experimental/docs/TypeHolderExample.md @@ -1,10 +1,11 @@ # TypeHolderExample +a model to test required properties with an example and length one enum ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bool_item** | **bool** | | -**array_item** | **list[int]** | | +**array_item** | **[int]** | | **string_item** | **str** | | defaults to 'what' **number_item** | **float** | | defaults to 1.234 **integer_item** | **int** | | defaults to -2 diff --git a/samples/client/petstore/python-experimental/docs/UserApi.md b/samples/client/petstore/python-experimental/docs/UserApi.md index b4df7a36803..d8d8b59a7d8 100644 --- a/samples/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/client/petstore/python-experimental/docs/UserApi.md @@ -83,7 +83,7 @@ from pprint import pprint # Create an instance of the API class api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object +body = [petstore_api.User()] # [User] | List of user object try: # Creates list of users with given input array @@ -96,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](User.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type @@ -134,7 +134,7 @@ from pprint import pprint # Create an instance of the API class api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object +body = [petstore_api.User()] # [User] | List of user object try: # Creates list of users with given input array @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[User]**](User.md)| List of user object | + **body** | [**[User]**](User.md)| List of user object | ### Return type diff --git a/samples/client/petstore/python-experimental/docs/XmlItem.md b/samples/client/petstore/python-experimental/docs/XmlItem.md index 3dd09833fe5..d30ca436229 100644 --- a/samples/client/petstore/python-experimental/docs/XmlItem.md +++ b/samples/client/petstore/python-experimental/docs/XmlItem.md @@ -7,31 +7,31 @@ Name | Type | Description | Notes **attribute_number** | **float** | | [optional] **attribute_integer** | **int** | | [optional] **attribute_boolean** | **bool** | | [optional] -**wrapped_array** | **list[int]** | | [optional] +**wrapped_array** | **[int]** | | [optional] **name_string** | **str** | | [optional] **name_number** | **float** | | [optional] **name_integer** | **int** | | [optional] **name_boolean** | **bool** | | [optional] -**name_array** | **list[int]** | | [optional] -**name_wrapped_array** | **list[int]** | | [optional] +**name_array** | **[int]** | | [optional] +**name_wrapped_array** | **[int]** | | [optional] **prefix_string** | **str** | | [optional] **prefix_number** | **float** | | [optional] **prefix_integer** | **int** | | [optional] **prefix_boolean** | **bool** | | [optional] -**prefix_array** | **list[int]** | | [optional] -**prefix_wrapped_array** | **list[int]** | | [optional] +**prefix_array** | **[int]** | | [optional] +**prefix_wrapped_array** | **[int]** | | [optional] **namespace_string** | **str** | | [optional] **namespace_number** | **float** | | [optional] **namespace_integer** | **int** | | [optional] **namespace_boolean** | **bool** | | [optional] -**namespace_array** | **list[int]** | | [optional] -**namespace_wrapped_array** | **list[int]** | | [optional] +**namespace_array** | **[int]** | | [optional] +**namespace_wrapped_array** | **[int]** | | [optional] **prefix_ns_string** | **str** | | [optional] **prefix_ns_number** | **float** | | [optional] **prefix_ns_integer** | **int** | | [optional] **prefix_ns_boolean** | **bool** | | [optional] -**prefix_ns_array** | **list[int]** | | [optional] -**prefix_ns_wrapped_array** | **list[int]** | | [optional] +**prefix_ns_array** | **[int]** | | [optional] +**prefix_ns_wrapped_array** | **[int]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py index 1c429821437..2a875ae7876 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py @@ -22,10 +22,18 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.client import Client class AnotherFakeApi(object): @@ -50,28 +58,55 @@ class AnotherFakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Client body: client model (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Client If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.call_123_test_special_tags = Endpoint( settings={ - 'response_type': 'Client', + 'response_type': (Client,), 'auth': [], 'endpoint_path': '/another-fake/dummy', 'operation_id': 'call_123_test_special_tags', @@ -98,7 +133,7 @@ class AnotherFakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Client', + 'body': (Client,), }, 'attribute_map': { }, @@ -128,7 +163,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -164,11 +199,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -182,8 +230,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -194,6 +241,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -207,14 +268,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -239,20 +306,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -261,7 +323,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -300,9 +366,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py index 4b41defbc5a..c38dac0a5b0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py @@ -22,10 +22,24 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.client import Client +from petstore_api.models.file_schema_test_class import FileSchemaTestClass +from petstore_api.models.outer_composite import OuterComposite +from petstore_api.models.outer_enum import OuterEnum +from petstore_api.models.outer_number import OuterNumber +from petstore_api.models.user import User +from petstore_api.models.xml_item import XmlItem class FakeApi(object): @@ -50,22 +64,49 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param XmlItem xml_item: XmlItem Body (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['xml_item'] = xml_item return self.call_with_http_info(**kwargs) @@ -98,7 +139,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'xml_item': 'XmlItem', + 'xml_item': (XmlItem,), }, 'attribute_map': { }, @@ -133,27 +174,54 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param bool body: Input boolean as post body :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: bool If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.fake_outer_boolean_serialize = Endpoint( settings={ - 'response_type': 'bool', + 'response_type': (bool,), 'auth': [], 'endpoint_path': '/fake/outer/boolean', 'operation_id': 'fake_outer_boolean_serialize', @@ -178,7 +246,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'bool', + 'body': (bool,), }, 'attribute_map': { }, @@ -208,27 +276,54 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param OuterComposite body: Input composite as post body :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: OuterComposite If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.fake_outer_composite_serialize = Endpoint( settings={ - 'response_type': 'OuterComposite', + 'response_type': (OuterComposite,), 'auth': [], 'endpoint_path': '/fake/outer/composite', 'operation_id': 'fake_outer_composite_serialize', @@ -253,7 +348,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'OuterComposite', + 'body': (OuterComposite,), }, 'attribute_map': { }, @@ -283,27 +378,54 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param OuterEnum body: Input enum as post body :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: OuterEnum If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.fake_outer_enum_serialize = Endpoint( settings={ - 'response_type': 'OuterEnum', + 'response_type': (OuterEnum,), 'auth': [], 'endpoint_path': '/fake/outer/enum', 'operation_id': 'fake_outer_enum_serialize', @@ -328,7 +450,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'OuterEnum', + 'body': (OuterEnum,), }, 'attribute_map': { }, @@ -358,27 +480,54 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param OuterNumber body: Input number as post body :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: OuterNumber If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.fake_outer_number_serialize = Endpoint( settings={ - 'response_type': 'OuterNumber', + 'response_type': (OuterNumber,), 'auth': [], 'endpoint_path': '/fake/outer/number', 'operation_id': 'fake_outer_number_serialize', @@ -403,7 +552,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'OuterNumber', + 'body': (OuterNumber,), }, 'attribute_map': { }, @@ -433,27 +582,54 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str body: Input string as post body :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: str If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.fake_outer_string_serialize = Endpoint( settings={ - 'response_type': 'str', + 'response_type': (str,), 'auth': [], 'endpoint_path': '/fake/outer/string', 'operation_id': 'fake_outer_string_serialize', @@ -478,7 +654,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'str', + 'body': (str,), }, 'attribute_map': { }, @@ -508,22 +684,49 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param FileSchemaTestClass body: (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -556,7 +759,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'FileSchemaTestClass', + 'body': (FileSchemaTestClass,), }, 'attribute_map': { }, @@ -585,23 +788,50 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str query: (required) :param User body: (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['query'] = query kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -637,8 +867,8 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'query': 'str', - 'body': 'User', + 'query': (str,), + 'body': (User,), }, 'attribute_map': { 'query': 'query', @@ -670,28 +900,55 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Client body: client model (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Client If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.test_client_model = Endpoint( settings={ - 'response_type': 'Client', + 'response_type': (Client,), 'auth': [], 'endpoint_path': '/fake', 'operation_id': 'test_client_model', @@ -718,7 +975,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Client', + 'body': (Client,), }, 'attribute_map': { }, @@ -750,26 +1007,53 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int query_integer: (required) :param str query_string: (required) :param str path_string: (required) :param int path_integer: (required) :param float header_number: (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['query_integer'] = query_integer kwargs['query_string'] = query_string kwargs['path_string'] = path_string @@ -839,11 +1123,11 @@ class FakeApi(object): }, }, 'openapi_types': { - 'query_integer': 'int', - 'query_string': 'str', - 'path_string': 'str', - 'path_integer': 'int', - 'header_number': 'float', + 'query_integer': (int,), + 'query_string': (str,), + 'path_string': (str,), + 'path_integer': (int,), + 'header_number': (float,), }, 'attribute_map': { 'query_integer': 'query_integer', @@ -880,6 +1164,7 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param float number: None (required) :param float double: None (required) :param str pattern_without_delimiter: None (required) @@ -889,26 +1174,52 @@ class FakeApi(object): :param int int64: None :param float float: None :param str string: None - :param file binary: None + :param file_type binary: None :param date date: None :param datetime date_time: None :param str password: None :param str param_callback: None :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['number'] = number kwargs['double'] = double kwargs['pattern_without_delimiter'] = pattern_without_delimiter @@ -1011,20 +1322,20 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'number': 'float', - 'double': 'float', - 'pattern_without_delimiter': 'str', - 'byte': 'str', - 'integer': 'int', - 'int32': 'int', - 'int64': 'int', - 'float': 'float', - 'string': 'str', - 'binary': 'file', - 'date': 'date', - 'date_time': 'datetime', - 'password': 'str', - 'param_callback': 'str', + 'number': (float,), + 'double': (float,), + 'pattern_without_delimiter': (str,), + 'byte': (str,), + 'integer': (int,), + 'int32': (int,), + 'int64': (int,), + 'float': (float,), + 'string': (str,), + 'binary': (file_type,), + 'date': (date,), + 'date_time': (datetime,), + 'password': (str,), + 'param_callback': (str,), }, 'attribute_map': { 'number': 'number', @@ -1081,29 +1392,56 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param list[str] enum_header_string_array: Header parameter enum test (string array) + Default is False. + :param [str] enum_header_string_array: Header parameter enum test (string array) :param str enum_header_string: Header parameter enum test (string) - :param list[str] enum_query_string_array: Query parameter enum test (string array) + :param [str] enum_query_string_array: Query parameter enum test (string array) :param str enum_query_string: Query parameter enum test (string) :param int enum_query_integer: Query parameter enum test (double) :param float enum_query_double: Query parameter enum test (double) - :param list[str] enum_form_string_array: Form parameter enum test (string array) + :param [str] enum_form_string_array: Form parameter enum test (string array) :param str enum_form_string: Form parameter enum test (string) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.test_enum_parameters = Endpoint( @@ -1191,14 +1529,14 @@ class FakeApi(object): }, }, 'openapi_types': { - 'enum_header_string_array': 'list[str]', - 'enum_header_string': 'str', - 'enum_query_string_array': 'list[str]', - 'enum_query_string': 'str', - 'enum_query_integer': 'int', - 'enum_query_double': 'float', - 'enum_form_string_array': 'list[str]', - 'enum_form_string': 'str', + 'enum_header_string_array': ([str],), + 'enum_header_string': (str,), + 'enum_query_string_array': ([str],), + 'enum_query_string': (str,), + 'enum_query_integer': (int,), + 'enum_query_double': (float,), + 'enum_form_string_array': ([str],), + 'enum_form_string': (str,), }, 'attribute_map': { 'enum_header_string_array': 'enum_header_string_array', @@ -1246,6 +1584,7 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int required_string_group: Required String in group parameters (required) :param bool required_boolean_group: Required Boolean in group parameters (required) :param int required_int64_group: Required Integer in group parameters (required) @@ -1253,20 +1592,46 @@ class FakeApi(object): :param bool boolean_group: Boolean in group parameters :param int int64_group: Integer in group parameters :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['required_string_group'] = required_string_group kwargs['required_boolean_group'] = required_boolean_group kwargs['required_int64_group'] = required_int64_group @@ -1308,12 +1673,12 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'required_string_group': 'int', - 'required_boolean_group': 'bool', - 'required_int64_group': 'int', - 'string_group': 'int', - 'boolean_group': 'bool', - 'int64_group': 'int', + 'required_string_group': (int,), + 'required_boolean_group': (bool,), + 'required_int64_group': (int,), + 'string_group': (int,), + 'boolean_group': (bool,), + 'int64_group': (int,), }, 'attribute_map': { 'required_string_group': 'required_string_group', @@ -1351,22 +1716,49 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param dict(str, str) param: request body (required) + Default is False. + :param {str: (str,)} param: request body (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['param'] = param return self.call_with_http_info(**kwargs) @@ -1399,7 +1791,7 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'param': 'dict(str, str)', + 'param': ({str: (str,)},), }, 'attribute_map': { }, @@ -1428,23 +1820,50 @@ class FakeApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str param: field1 (required) :param str param2: field2 (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['param'] = param kwargs['param2'] = param2 return self.call_with_http_info(**kwargs) @@ -1480,8 +1899,8 @@ class FakeApi(object): 'allowed_values': { }, 'openapi_types': { - 'param': 'str', - 'param2': 'str', + 'param': (str,), + 'param2': (str,), }, 'attribute_map': { 'param': 'param', @@ -1512,7 +1931,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -1548,11 +1967,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -1566,8 +1998,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -1578,6 +2009,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -1591,14 +2036,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -1623,20 +2074,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -1645,7 +2091,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -1684,9 +2134,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py index 6811a990bbc..45931801423 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py @@ -22,10 +22,18 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.client import Client class FakeClassnameTags123Api(object): @@ -50,28 +58,55 @@ class FakeClassnameTags123Api(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Client body: client model (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Client If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.test_classname = Endpoint( settings={ - 'response_type': 'Client', + 'response_type': (Client,), 'auth': [ 'api_key_query' ], @@ -100,7 +135,7 @@ class FakeClassnameTags123Api(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Client', + 'body': (Client,), }, 'attribute_map': { }, @@ -130,7 +165,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -166,11 +201,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -184,8 +232,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -196,6 +243,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -209,14 +270,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -241,20 +308,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -263,7 +325,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -302,9 +368,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py index 29bbead6c35..ba58ba92a81 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py @@ -22,10 +22,19 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.api_response import ApiResponse +from petstore_api.models.pet import Pet class PetApi(object): @@ -49,22 +58,49 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Pet body: Pet object that needs to be added to the store (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -99,7 +135,7 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Pet', + 'body': (Pet,), }, 'attribute_map': { }, @@ -129,23 +165,50 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int pet_id: Pet id to delete (required) :param str api_key: :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) @@ -181,8 +244,8 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'pet_id': 'int', - 'api_key': 'str', + 'pet_id': (int,), + 'api_key': (str,), }, 'attribute_map': { 'pet_id': 'petId', @@ -213,28 +276,55 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param list[str] status: Status values that need to be considered for filter (required) + Default is False. + :param [str] status: Status values that need to be considered for filter (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Pet] + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. + :return: [Pet] If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['status'] = status return self.call_with_http_info(**kwargs) self.find_pets_by_status = Endpoint( settings={ - 'response_type': 'list[Pet]', + 'response_type': ([Pet],), 'auth': [ 'petstore_auth' ], @@ -270,7 +360,7 @@ class PetApi(object): }, }, 'openapi_types': { - 'status': 'list[str]', + 'status': ([str],), }, 'attribute_map': { 'status': 'status', @@ -303,28 +393,55 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param list[str] tags: Tags to filter by (required) + Default is False. + :param [str] tags: Tags to filter by (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: list[Pet] + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. + :return: [Pet] If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['tags'] = tags return self.call_with_http_info(**kwargs) self.find_pets_by_tags = Endpoint( settings={ - 'response_type': 'list[Pet]', + 'response_type': ([Pet],), 'auth': [ 'petstore_auth' ], @@ -353,7 +470,7 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'tags': 'list[str]', + 'tags': ([str],), }, 'attribute_map': { 'tags': 'tags', @@ -386,28 +503,55 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int pet_id: ID of pet to return (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Pet If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.get_pet_by_id = Endpoint( settings={ - 'response_type': 'Pet', + 'response_type': (Pet,), 'auth': [ 'api_key' ], @@ -436,7 +580,7 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'pet_id': 'int', + 'pet_id': (int,), }, 'attribute_map': { 'pet_id': 'petId', @@ -467,22 +611,49 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Pet body: Pet object that needs to be added to the store (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -517,7 +688,7 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Pet', + 'body': (Pet,), }, 'attribute_map': { }, @@ -547,24 +718,51 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int pet_id: ID of pet that needs to be updated (required) :param str name: Updated name of the pet :param str status: Updated status of the pet :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) @@ -601,9 +799,9 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'pet_id': 'int', - 'name': 'str', - 'status': 'str', + 'pet_id': (int,), + 'name': (str,), + 'status': (str,), }, 'attribute_map': { 'pet_id': 'petId', @@ -637,30 +835,58 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int pet_id: ID of pet to update (required) :param str additional_metadata: Additional data to pass to server - :param file file: file to upload + :param file_type file: file to upload + :param [file_type] files: files to upload :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: ApiResponse If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.upload_file = Endpoint( settings={ - 'response_type': 'ApiResponse', + 'response_type': (ApiResponse,), 'auth': [ 'petstore_auth' ], @@ -674,6 +900,7 @@ class PetApi(object): 'pet_id', 'additional_metadata', 'file', + 'files', ], 'required': [ 'pet_id', @@ -691,21 +918,25 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'pet_id': 'int', - 'additional_metadata': 'str', - 'file': 'file', + 'pet_id': (int,), + 'additional_metadata': (str,), + 'file': (file_type,), + 'files': ([file_type],), }, 'attribute_map': { 'pet_id': 'petId', 'additional_metadata': 'additionalMetadata', 'file': 'file', + 'files': 'files', }, 'location_map': { 'pet_id': 'path', 'additional_metadata': 'form', 'file': 'form', + 'files': 'form', }, 'collection_format_map': { + 'files': 'csv', } }, headers_map={ @@ -729,31 +960,58 @@ class PetApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int pet_id: ID of pet to update (required) - :param file required_file: file to upload (required) + :param file_type required_file: file to upload (required) :param str additional_metadata: Additional data to pass to server :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: ApiResponse If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id kwargs['required_file'] = required_file return self.call_with_http_info(**kwargs) self.upload_file_with_required_file = Endpoint( settings={ - 'response_type': 'ApiResponse', + 'response_type': (ApiResponse,), 'auth': [ 'petstore_auth' ], @@ -785,9 +1043,9 @@ class PetApi(object): 'allowed_values': { }, 'openapi_types': { - 'pet_id': 'int', - 'required_file': 'file', - 'additional_metadata': 'str', + 'pet_id': (int,), + 'required_file': (file_type,), + 'additional_metadata': (str,), }, 'attribute_map': { 'pet_id': 'petId', @@ -822,7 +1080,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -858,11 +1116,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -876,8 +1147,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -888,6 +1158,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -901,14 +1185,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -933,20 +1223,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -955,7 +1240,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -994,9 +1283,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py index db3f4d2561d..cdeebcce432 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py @@ -22,10 +22,18 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.order import Order class StoreApi(object): @@ -50,22 +58,49 @@ class StoreApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str order_id: ID of the order that needs to be deleted (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['order_id'] = order_id return self.call_with_http_info(**kwargs) @@ -98,7 +133,7 @@ class StoreApi(object): 'allowed_values': { }, 'openapi_types': { - 'order_id': 'str', + 'order_id': (str,), }, 'attribute_map': { 'order_id': 'order_id', @@ -127,26 +162,53 @@ class StoreApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: dict(str, int) + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. + :return: {str: (int,)} If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.get_inventory = Endpoint( settings={ - 'response_type': 'dict(str, int)', + 'response_type': ({str: (int,)},), 'auth': [ 'api_key' ], @@ -200,28 +262,55 @@ class StoreApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param int order_id: ID of pet that needs to be fetched (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Order If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['order_id'] = order_id return self.call_with_http_info(**kwargs) self.get_order_by_id = Endpoint( settings={ - 'response_type': 'Order', + 'response_type': (Order,), 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'get_order_by_id', @@ -254,7 +343,7 @@ class StoreApi(object): 'allowed_values': { }, 'openapi_types': { - 'order_id': 'int', + 'order_id': (int,), }, 'attribute_map': { 'order_id': 'order_id', @@ -285,28 +374,55 @@ class StoreApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param Order body: order placed for purchasing the pet (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: Order If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.place_order = Endpoint( settings={ - 'response_type': 'Order', + 'response_type': (Order,), 'auth': [], 'endpoint_path': '/store/order', 'operation_id': 'place_order', @@ -333,7 +449,7 @@ class StoreApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'Order', + 'body': (Order,), }, 'attribute_map': { }, @@ -362,7 +478,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -398,11 +514,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -416,8 +545,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -428,6 +556,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -441,14 +583,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -473,20 +621,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -495,7 +638,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -534,9 +681,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py index 7a3fb67c126..3e668cf374b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py @@ -22,10 +22,18 @@ from petstore_api.exceptions import ( ApiTypeError, ApiValueError ) -from petstore_api.model_utils import ( +from petstore_api.model_utils import ( # noqa: F401 check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + int, + none_type, + str, + validate_and_convert_types ) +from petstore_api.models.user import User class UserApi(object): @@ -50,22 +58,49 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param User body: Created user object (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -98,7 +133,7 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'User', + 'body': (User,), }, 'attribute_map': { }, @@ -125,22 +160,49 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param list[User] body: List of user object (required) + Default is False. + :param [User] body: List of user object (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -173,7 +235,7 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'list[User]', + 'body': ([User],), }, 'attribute_map': { }, @@ -200,22 +262,49 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously - :param list[User] body: List of user object (required) + Default is False. + :param [User] body: List of user object (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -248,7 +337,7 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'body': 'list[User]', + 'body': ([User],), }, 'attribute_map': { }, @@ -276,22 +365,49 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str username: The name that needs to be deleted (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = username return self.call_with_http_info(**kwargs) @@ -324,7 +440,7 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'username': 'str', + 'username': (str,), }, 'attribute_map': { 'username': 'username', @@ -352,28 +468,55 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str username: The name that needs to be fetched. Use user1 for testing. (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: User If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = username return self.call_with_http_info(**kwargs) self.get_user_by_name = Endpoint( settings={ - 'response_type': 'User', + 'response_type': (User,), 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'get_user_by_name', @@ -400,7 +543,7 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'username': 'str', + 'username': (str,), }, 'attribute_map': { 'username': 'username', @@ -431,30 +574,57 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str username: The user name for login (required) :param str password: The password for login in clear text (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: str If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = username kwargs['password'] = password return self.call_with_http_info(**kwargs) self.login_user = Endpoint( settings={ - 'response_type': 'str', + 'response_type': (str,), 'auth': [], 'endpoint_path': '/user/login', 'operation_id': 'login_user', @@ -483,8 +653,8 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'username': 'str', - 'password': 'str', + 'username': (str,), + 'password': (str,), }, 'attribute_map': { 'username': 'username', @@ -517,21 +687,48 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.logout_user = Endpoint( @@ -586,23 +783,50 @@ class UserApi(object): >>> result = thread.get() :param async_req bool: execute request asynchronously + Default is False. :param str username: name that need to be deleted (required) :param User body: Updated user object (required) :param _return_http_data_only: response data without head status - code and headers + code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + Default is None. + :param _check_input_type: boolean specifying if type checking + should be done one the data sent to the server. + Default is True. + :param _check_return_type: boolean specifying if type checking + should be done one the data received from the server. + Default is True. + :param _host_index: integer specifying the index of the server + that we want to use. + Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = username kwargs['body'] = body return self.call_with_http_info(**kwargs) @@ -638,8 +862,8 @@ class UserApi(object): 'allowed_values': { }, 'openapi_types': { - 'username': 'str', - 'body': 'User', + 'username': (str,), + 'body': (User,), }, 'attribute_map': { 'username': 'username', @@ -667,7 +891,7 @@ class Endpoint(object): Args: settings (dict): see below key value pairs - 'response_type' (str): response type + 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier @@ -703,11 +927,24 @@ class Endpoint(object): '_host_index', '_preload_content', '_request_timeout', - '_return_http_data_only' + '_return_http_data_only', + '_check_input_type', + '_check_return_type' ]) + self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] self.allowed_values = root_map['allowed_values'] self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (int,), + '_preload_content': (bool,), + '_request_timeout': (none_type, int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] self.location_map = root_map['location_map'] self.collection_format_map = root_map['collection_format_map'] @@ -721,8 +958,7 @@ class Endpoint(object): check_allowed_values( self.allowed_values, (param,), - kwargs[param], - self.validations + kwargs[param] ) for param in self.params_map['validation']: @@ -733,6 +969,20 @@ class Endpoint(object): kwargs[param] ) + if kwargs['_check_input_type'] is False: + return + + for key, value in six.iteritems(kwargs): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + def __gather_params(self, kwargs): params = { 'body': None, @@ -746,14 +996,20 @@ class Endpoint(object): for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) + if param_location is None: + continue if param_location: if param_location == 'body': params['body'] = param_value continue base_name = self.attribute_map[param_name] if (param_location == 'form' and - self.openapi_types[param_name] == 'file'): - param_location = 'file' + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) @@ -778,20 +1034,15 @@ class Endpoint(object): def call_with_http_info(self, **kwargs): - if kwargs.get('_host_index') and self.settings['servers']: - _host_index = kwargs.get('_host_index') - try: - _host = self.settings['servers'][_host_index] - except IndexError: + try: + _host = self.settings['servers'][kwargs['_host_index']] + except IndexError: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers']) ) - else: - try: - _host = self.settings['servers'][0] - except IndexError: - _host = None + _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map['all']: @@ -800,7 +1051,11 @@ class Endpoint(object): " to method `%s`" % (key, self.settings['operation_id']) ) - if key not in self.params_map['nullable'] and value is None: + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % @@ -839,9 +1094,10 @@ class Endpoint(object): files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], - async_req=kwargs.get('async_req'), - _return_http_data_only=kwargs.get('_return_http_data_only'), - _preload_content=kwargs.get('_preload_content', True), - _request_timeout=kwargs.get('_request_timeout'), + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, collection_formats=params['collection_format']) diff --git a/samples/client/petstore/python-experimental/petstore_api/api_client.py b/samples/client/petstore/python-experimental/petstore_api/api_client.py index 7afd6306dcf..3cfe1c3ecc8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api_client.py +++ b/samples/client/petstore/python-experimental/petstore_api/api_client.py @@ -10,27 +10,29 @@ from __future__ import absolute_import -import datetime -import inspect import json import mimetypes from multiprocessing.pool import ThreadPool import os -import re -import tempfile # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote -import petstore_api.models from petstore_api import rest from petstore_api.configuration import Configuration +from petstore_api.exceptions import ApiValueError from petstore_api.model_utils import ( ModelNormal, - ModelSimple + ModelSimple, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + str, + validate_and_convert_types ) -from petstore_api.exceptions import ApiValueError class ApiClient(object): @@ -55,17 +57,11 @@ class ApiClient(object): to the API. More threads means more concurrent API requests. """ - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } + # six.binary_type python2=str, python3=bytes + # six.text_type python2=unicode, python3=str + PRIMITIVE_TYPES = ( + (float, bool, six.binary_type, six.text_type) + six.integer_types + ) _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, @@ -115,7 +111,8 @@ class ApiClient(object): query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + _preload_content=True, _request_timeout=None, _host=None, + _check_type=None): config = self.configuration @@ -182,7 +179,11 @@ class ApiClient(object): if _preload_content: # deserialize response data if response_type: - return_data = self.deserialize(response_data, response_type) + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) else: return_data = None @@ -216,93 +217,73 @@ class ApiClient(object): elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): + elif isinstance(obj, (datetime, date)): return obj.isoformat() if isinstance(obj, dict): obj_dict = obj elif isinstance(obj, ModelNormal): - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. + # Convert model obj to dict # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} + # model definition for request + obj_dict = model_to_dict(obj, serialize=True) elif isinstance(obj, ModelSimple): return self.sanitize_for_serialization(obj.value) return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)} - def deserialize(self, response, response_type): + def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server :return: deserialized object. """ # handle file downloading # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) # fetch data from response object try: - data = json.loads(response.data) + received_data = json.loads(response.data) except ValueError: - data = response.data + received_data = response.data - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(petstore_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + _preload_content=True, _request_timeout=None, _host=None, + _check_type=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. @@ -317,9 +298,18 @@ class ApiClient(object): :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files dict: key -> field name, value -> a list of open file + objects for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers @@ -332,6 +322,8 @@ class ApiClient(object): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. :return: If async_req parameter is True, the request will be called asynchronously. @@ -345,7 +337,8 @@ class ApiClient(object): body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) + _preload_content, _request_timeout, _host, + _check_type) else: thread = self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, @@ -356,7 +349,7 @@ class ApiClient(object): collection_formats, _preload_content, _request_timeout, - _host)) + _host, _check_type)) return thread def request(self, method, url, query_params=None, headers=None, @@ -453,24 +446,34 @@ class ApiClient(object): def files_parameters(self, files=None): """Builds form parameters. - :param files: File parameters. - :return: Form parameters with files. + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data """ - params = [] + if files is None: + return [] - if files: - for k, v in six.iteritems(files): - if not v: + params = [] + for param_name, file_instances in six.iteritems(files): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = file_instance.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + file_instance.close() return params @@ -531,133 +534,3 @@ class ApiClient(object): raise ApiValueError( 'Authentication token must be in `query` or `header`' ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - except ValueError as exc: - raise ApiValueError(str(exc)) - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal, ModelSimple or ModelNormal - :return: model object. - """ - - if issubclass(klass, ModelSimple): - value = self.__deserialize(data, klass.openapi_types['value']) - return klass(value) - - # code to handle ModelNormal - used_data = data - if not isinstance(data, (list, dict)): - used_data = [data] - keyword_args = {} - positional_args = [] - if klass.openapi_types is not None: - for attr, attr_type in six.iteritems(klass.openapi_types): - if (data is not None and - klass.attribute_map[attr] in used_data): - value = used_data[klass.attribute_map[attr]] - keyword_args[attr] = self.__deserialize(value, attr_type) - end_index = None - argspec = inspect.getargspec(getattr(klass, '__init__')) - if argspec.defaults: - end_index = -len(argspec.defaults) - required_positional_args = argspec.args[1:end_index] - for index, req_positional_arg in enumerate(required_positional_args): - if keyword_args and req_positional_arg in keyword_args: - positional_args.append(keyword_args[req_positional_arg]) - del keyword_args[req_positional_arg] - elif (not keyword_args and index < len(used_data) and - isinstance(used_data, list)): - positional_args.append(used_data[index]) - instance = klass(*positional_args, **keyword_args) - if hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index 57ca211a0f7..22d9ee459de 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -9,13 +9,162 @@ Generated by: https://openapi-generator.tech """ + +import copy +from datetime import date, datetime # noqa: F401 +import inspect +import os import re +import tempfile -from petstore_api.exceptions import ApiValueError +from dateutil.parser import parse +import six + +from petstore_api.exceptions import ( + ApiKeyError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +if six.PY3: + import io + file_type = io.IOBase + # these are needed for when other modules import str and int from here + str = str + int = int +else: + file_type = file # noqa: F821 + str_py2 = str + unicode_py2 = unicode # noqa: F821 + long_py2 = long # noqa: F821 + int_py2 = int + # this requires that the future library is installed + from builtins import int, str -def check_allowed_values(allowed_values, input_variable_path, input_values, - validations): +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + +COERCION_INDEX_BY_TYPE = { + ModelNormal: 0, + ModelSimple: 1, + none_type: 2, + list: 3, + dict: 4, + float: 5, + int: 6, + bool: 7, + datetime: 8, + date: 9, + str: 10, + file_type: 11, +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + # for python2 input_value==long_instance -> return int + # where int is the python3 int backport + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif (six.PY2 and isinstance(input_value, (str_py2, unicode_py2, str)) or + isinstance(input_value, str)): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): """Raises an exception if the input_values are not allowed Args: @@ -23,14 +172,9 @@ def check_allowed_values(allowed_values, input_variable_path, input_values, input_variable_path (tuple): the path to the input variable input_values (list/str/int/float/date/datetime): the values that we are checking to see if they are in allowed_values - validations (dict): the validations dict """ - min_collection_length = ( - validations.get(input_variable_path, {}).get('min_length') or - validations.get(input_variable_path, {}).get('min_items', 0)) these_allowed_values = list(allowed_values[input_variable_path].values()) if (isinstance(input_values, list) - and len(input_values) > min_collection_length and not set(input_values).issubset( set(these_allowed_values))): invalid_values = ", ".join( @@ -44,7 +188,6 @@ def check_allowed_values(allowed_values, input_variable_path, input_values, ) ) elif (isinstance(input_values, dict) - and len(input_values) > min_collection_length and not set( input_values.keys()).issubset(set(these_allowed_values))): invalid_values = ", ".join( @@ -119,8 +262,21 @@ def check_validations(validations, input_variable_path, input_values): ) ) + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + if ('exclusive_maximum' in current_validations and - input_values >= current_validations['exclusive_maximum']): + max_val >= current_validations['exclusive_maximum']): raise ApiValueError( "Invalid value for `%s`, must be a value less than `%s`" % ( input_variable_path[0], @@ -129,7 +285,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('inclusive_maximum' in current_validations and - input_values > current_validations['inclusive_maximum']): + max_val > current_validations['inclusive_maximum']): raise ApiValueError( "Invalid value for `%s`, must be a value less than or equal to " "`%s`" % ( @@ -139,7 +295,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('exclusive_minimum' in current_validations and - input_values <= current_validations['exclusive_minimum']): + min_val <= current_validations['exclusive_minimum']): raise ApiValueError( "Invalid value for `%s`, must be a value greater than `%s`" % ( @@ -149,7 +305,7 @@ def check_validations(validations, input_variable_path, input_values): ) if ('inclusive_minimum' in current_validations and - input_values < current_validations['inclusive_minimum']): + min_val < current_validations['inclusive_minimum']): raise ApiValueError( "Invalid value for `%s`, must be a value greater than or equal " "to `%s`" % ( @@ -171,13 +327,550 @@ def check_validations(validations, input_variable_path, input_values): ) -class ModelSimple(object): - # the parent class of models whose type != object in their swagger/openapi - # spec - pass +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with classs information inside it + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with classs information inside it + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + return COERCION_INDEX_BY_TYPE[class_or_instance] + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types -class ModelNormal(object): - # the parent class of models whose type == object in their swagger/openapi - # spec - pass +def remove_uncoercible(required_types_classes, current_item, from_server, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + from_server (bool): a boolean of whether the data is from the server + if false, the data is from the client + current_item (any): the current item to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[from_server]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + + +def get_required_type_classes(required_types_mixed): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (doct): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.append(required_type) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class + """ + + output_dict = {} + reversed_attr_map = {value: key for key, value in + six.iteritems(model_class.attribute_map)} + for javascript_key, value in six.iteritems(input_dict): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError): + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), get_py3_class_name(klass) + ), + path_to_item=path_to_item + ) + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, from_server): + """Deserializes model_data to model instance. + + Args: + model_data (list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + from_server (bool): True if the data is from the server + False if the data is from the client + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + fixed_model_data = copy.deepcopy(model_data) + + if isinstance(fixed_model_data, dict): + fixed_model_data = change_keys_js_to_python(fixed_model_data, + model_class) + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _from_server=from_server) + + if hasattr(model_class, 'get_real_child_model'): + # discriminator case + discriminator_class = model_class.get_real_child_model(model_data) + if discriminator_class: + if isinstance(model_data, list): + instance = discriminator_class(*model_data, **kw_args) + elif isinstance(model_data, dict): + fixed_model_data = change_keys_js_to_python( + fixed_model_data, + discriminator_class + ) + kw_args.update(fixed_model_data) + instance = discriminator_class(**kw_args) + else: + # all other cases + if isinstance(model_data, list): + instance = model_class(*model_data, **kw_args) + if isinstance(model_data, dict): + fixed_model_data = change_keys_js_to_python(fixed_model_data, + model_class) + kw_args.update(fixed_model_data) + instance = model_class(**kw_args) + else: + instance = model_class(model_data, **kw_args) + + return instance + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if six.PY3 and isinstance(response_data, str): + # in python3 change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, from_server, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + from_server (bool): True if data is from the server, False is data is + from the client + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelNormal and ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, from_server) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, from_server) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + from_server, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + from_server (bool): True if data is from the server + False if data is from the client + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = input_class_simple in set(valid_classes) + if not valid_type: + if configuration: + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + from_server, + key_type=False, + must_convert=True + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, from_server, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + from_server, + key_type=False, + must_convert=False + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + from_server, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in six.iteritems(input_value): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + from_server, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + for attr, value in six.iteritems(model_instance._data_store): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + attr = model_instance.attribute_map.get(attr, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: model_to_dict(x, serialize=serialize) + if hasattr(x, '_data_store') else x, value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], + model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], '_data_store') else item, + value.items() + )) + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + Note: Adds the extra valid classes in python2 + """ + all_classes = list(input_classes) + if six.PY2 and str in input_classes: + all_classes.extend([str_py2, unicode_py2]) + if six.PY2 and int in input_classes: + all_classes.extend([int_py2, long_py2]) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_py3_class_name(input_class): + if six.PY2: + if input_class == str: + return 'str' + elif input_class == int: + return 'int' + return input_class.__name__ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 25e165ed7b5..16b3e933e7f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesAnyType(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesAnyType(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesAnyType - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesAnyType. # noqa: E501 - - :return: The name of this AdditionalPropertiesAnyType. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesAnyType. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesAnyType. - - - :param name: The name of this AdditionalPropertiesAnyType. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesAnyType. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesAnyType(ModelNormal): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 5de262b864d..91e75256f55 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesArray(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesArray(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesArray - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesArray. # noqa: E501 - - :return: The name of this AdditionalPropertiesArray. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesArray. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesArray. - - - :param name: The name of this AdditionalPropertiesArray. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesArray. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesArray(ModelNormal): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py index 70675c7d3ae..ee30aacc80b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesBoolean(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesBoolean(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = (bool,) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesBoolean - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesBoolean. # noqa: E501 - - :return: The name of this AdditionalPropertiesBoolean. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesBoolean. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesBoolean. - - - :param name: The name of this AdditionalPropertiesBoolean. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesBoolean. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesBoolean(ModelNormal): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index efa4d6a09d1..407b63975b7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesClass(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -66,359 +82,302 @@ class AdditionalPropertiesClass(ModelNormal): } openapi_types = { - 'map_string': 'dict(str, str)', - 'map_number': 'dict(str, float)', - 'map_integer': 'dict(str, int)', - 'map_boolean': 'dict(str, bool)', - 'map_array_integer': 'dict(str, list[int])', - 'map_array_anytype': 'dict(str, list[object])', - 'map_map_string': 'dict(str, dict(str, str))', - 'map_map_anytype': 'dict(str, dict(str, object))', - 'anytype_1': 'object', - 'anytype_2': 'object', - 'anytype_3': 'object' + 'map_string': ({str: (str,)},), # noqa: E501 + 'map_number': ({str: (float,)},), # noqa: E501 + 'map_integer': ({str: (int,)},), # noqa: E501 + 'map_boolean': ({str: (bool,)},), # noqa: E501 + 'map_array_integer': ({str: ([int],)},), # noqa: E501 + 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 + 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 + 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 } validations = { } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 - """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._map_string = None - self._map_number = None - self._map_integer = None - self._map_boolean = None - self._map_array_integer = None - self._map_array_anytype = None - self._map_map_string = None - self._map_map_anytype = None - self._anytype_1 = None - self._anytype_2 = None - self._anytype_3 = None - self.discriminator = None + discriminator = None - if map_string is not None: - self.map_string = ( - map_string + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesClass - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + map_string ({str: (str,)}): [optional] # noqa: E501 + map_number ({str: (float,)}): [optional] # noqa: E501 + map_integer ({str: (int,)}): [optional] # noqa: E501 + map_boolean ({str: (bool,)}): [optional] # noqa: E501 + map_array_integer ({str: ([int],)}): [optional] # noqa: E501 + map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501 + map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 + map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501 + anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if map_number is not None: - self.map_number = ( - map_number + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if map_integer is not None: - self.map_integer = ( - map_integer + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if map_boolean is not None: - self.map_boolean = ( - map_boolean + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if map_array_integer is not None: - self.map_array_integer = ( - map_array_integer - ) - if map_array_anytype is not None: - self.map_array_anytype = ( - map_array_anytype - ) - if map_map_string is not None: - self.map_map_string = ( - map_map_string - ) - if map_map_anytype is not None: - self.map_map_anytype = ( - map_map_anytype - ) - if anytype_1 is not None: - self.anytype_1 = ( - anytype_1 - ) - if anytype_2 is not None: - self.anytype_2 = ( - anytype_2 - ) - if anytype_3 is not None: - self.anytype_3 = ( - anytype_3 + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def map_string(self): """Gets the map_string of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_string of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, str) + Returns: + ({str: (str,)}): The map_string of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_string + return self.__get_item('map_string') @map_string.setter - def map_string(self, map_string): # noqa: E501 - """Sets the map_string of this AdditionalPropertiesClass. - - - :param map_string: The map_string of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, str) + def map_string(self, value): + """Sets the map_string of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_string = ( - map_string - ) + return self.__set_item('map_string', value) @property def map_number(self): """Gets the map_number of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_number of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, float) + Returns: + ({str: (float,)}): The map_number of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_number + return self.__get_item('map_number') @map_number.setter - def map_number(self, map_number): # noqa: E501 - """Sets the map_number of this AdditionalPropertiesClass. - - - :param map_number: The map_number of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, float) + def map_number(self, value): + """Sets the map_number of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_number = ( - map_number - ) + return self.__set_item('map_number', value) @property def map_integer(self): """Gets the map_integer of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_integer of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, int) + Returns: + ({str: (int,)}): The map_integer of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_integer + return self.__get_item('map_integer') @map_integer.setter - def map_integer(self, map_integer): # noqa: E501 - """Sets the map_integer of this AdditionalPropertiesClass. - - - :param map_integer: The map_integer of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, int) + def map_integer(self, value): + """Sets the map_integer of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_integer = ( - map_integer - ) + return self.__set_item('map_integer', value) @property def map_boolean(self): """Gets the map_boolean of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_boolean of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, bool) + Returns: + ({str: (bool,)}): The map_boolean of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_boolean + return self.__get_item('map_boolean') @map_boolean.setter - def map_boolean(self, map_boolean): # noqa: E501 - """Sets the map_boolean of this AdditionalPropertiesClass. - - - :param map_boolean: The map_boolean of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, bool) + def map_boolean(self, value): + """Sets the map_boolean of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_boolean = ( - map_boolean - ) + return self.__set_item('map_boolean', value) @property def map_array_integer(self): """Gets the map_array_integer of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, list[int]) + Returns: + ({str: ([int],)}): The map_array_integer of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_array_integer + return self.__get_item('map_array_integer') @map_array_integer.setter - def map_array_integer(self, map_array_integer): # noqa: E501 - """Sets the map_array_integer of this AdditionalPropertiesClass. - - - :param map_array_integer: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, list[int]) + def map_array_integer(self, value): + """Sets the map_array_integer of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_array_integer = ( - map_array_integer - ) + return self.__set_item('map_array_integer', value) @property def map_array_anytype(self): """Gets the map_array_anytype of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, list[object]) + Returns: + ({str: ([bool, date, datetime, dict, float, int, list, str],)}): The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_array_anytype + return self.__get_item('map_array_anytype') @map_array_anytype.setter - def map_array_anytype(self, map_array_anytype): # noqa: E501 - """Sets the map_array_anytype of this AdditionalPropertiesClass. - - - :param map_array_anytype: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, list[object]) + def map_array_anytype(self, value): + """Sets the map_array_anytype of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_array_anytype = ( - map_array_anytype - ) + return self.__set_item('map_array_anytype', value) @property def map_map_string(self): """Gets the map_map_string of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_map_string of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, dict(str, str)) + Returns: + ({str: ({str: (str,)},)}): The map_map_string of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_map_string + return self.__get_item('map_map_string') @map_map_string.setter - def map_map_string(self, map_map_string): # noqa: E501 - """Sets the map_map_string of this AdditionalPropertiesClass. - - - :param map_map_string: The map_map_string of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, dict(str, str)) + def map_map_string(self, value): + """Sets the map_map_string of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_map_string = ( - map_map_string - ) + return self.__set_item('map_map_string', value) @property def map_map_anytype(self): """Gets the map_map_anytype of this AdditionalPropertiesClass. # noqa: E501 - - :return: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, dict(str, object)) + Returns: + ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501 """ - return self._map_map_anytype + return self.__get_item('map_map_anytype') @map_map_anytype.setter - def map_map_anytype(self, map_map_anytype): # noqa: E501 - """Sets the map_map_anytype of this AdditionalPropertiesClass. - - - :param map_map_anytype: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501 - :type: dict(str, dict(str, object)) + def map_map_anytype(self, value): + """Sets the map_map_anytype of this AdditionalPropertiesClass. # noqa: E501 """ - - self._map_map_anytype = ( - map_map_anytype - ) + return self.__set_item('map_map_anytype', value) @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 - - :return: The anytype_1 of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object + Returns: + (bool, date, datetime, dict, float, int, list, str): The anytype_1 of this AdditionalPropertiesClass. # noqa: E501 """ - return self._anytype_1 + return self.__get_item('anytype_1') @anytype_1.setter - def anytype_1(self, anytype_1): # noqa: E501 - """Sets the anytype_1 of this AdditionalPropertiesClass. - - - :param anytype_1: The anytype_1 of this AdditionalPropertiesClass. # noqa: E501 - :type: object + def anytype_1(self, value): + """Sets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 """ - - self._anytype_1 = ( - anytype_1 - ) + return self.__set_item('anytype_1', value) @property def anytype_2(self): """Gets the anytype_2 of this AdditionalPropertiesClass. # noqa: E501 - - :return: The anytype_2 of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object + Returns: + (bool, date, datetime, dict, float, int, list, str): The anytype_2 of this AdditionalPropertiesClass. # noqa: E501 """ - return self._anytype_2 + return self.__get_item('anytype_2') @anytype_2.setter - def anytype_2(self, anytype_2): # noqa: E501 - """Sets the anytype_2 of this AdditionalPropertiesClass. - - - :param anytype_2: The anytype_2 of this AdditionalPropertiesClass. # noqa: E501 - :type: object + def anytype_2(self, value): + """Sets the anytype_2 of this AdditionalPropertiesClass. # noqa: E501 """ - - self._anytype_2 = ( - anytype_2 - ) + return self.__set_item('anytype_2', value) @property def anytype_3(self): """Gets the anytype_3 of this AdditionalPropertiesClass. # noqa: E501 - - :return: The anytype_3 of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object + Returns: + (bool, date, datetime, dict, float, int, list, str): The anytype_3 of this AdditionalPropertiesClass. # noqa: E501 """ - return self._anytype_3 + return self.__get_item('anytype_3') @anytype_3.setter - def anytype_3(self, anytype_3): # noqa: E501 - """Sets the anytype_3 of this AdditionalPropertiesClass. - - - :param anytype_3: The anytype_3 of this AdditionalPropertiesClass. # noqa: E501 - :type: object + def anytype_3(self, value): + """Sets the anytype_3 of this AdditionalPropertiesClass. # noqa: E501 """ - - self._anytype_3 = ( - anytype_3 - ) + return self.__set_item('anytype_3', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -433,7 +392,22 @@ class AdditionalPropertiesClass(ModelNormal): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py index 55ba58e1e20..558f48422a4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesInteger(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesInteger(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = (int,) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesInteger - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesInteger. # noqa: E501 - - :return: The name of this AdditionalPropertiesInteger. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesInteger. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesInteger. - - - :param name: The name of this AdditionalPropertiesInteger. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesInteger. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesInteger(ModelNormal): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py index 32a59a5bc52..25c9298cea9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesNumber(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesNumber(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = (float,) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesNumber - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesNumber. # noqa: E501 - - :return: The name of this AdditionalPropertiesNumber. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesNumber. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesNumber. - - - :param name: The name of this AdditionalPropertiesNumber. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesNumber. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesNumber(ModelNormal): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 362023c8460..67acc4099b8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesObject(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesObject(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesObject - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesObject. # noqa: E501 - - :return: The name of this AdditionalPropertiesObject. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesObject. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesObject. - - - :param name: The name of this AdditionalPropertiesObject. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesObject. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesObject(ModelNormal): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py index e01ff7028f2..5906157a158 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class AdditionalPropertiesString(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class AdditionalPropertiesString(ModelNormal): } openapi_types = { - 'name': 'str' + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None): # noqa: E501 - """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = (str,) # noqa: E501 - self._name = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """AdditionalPropertiesString - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this AdditionalPropertiesString. # noqa: E501 - - :return: The name of this AdditionalPropertiesString. # noqa: E501 - :rtype: str + Returns: + (str): The name of this AdditionalPropertiesString. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this AdditionalPropertiesString. - - - :param name: The name of this AdditionalPropertiesString. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this AdditionalPropertiesString. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class AdditionalPropertiesString(ModelNormal): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/client/petstore/python-experimental/petstore_api/models/animal.py index a2ce846a64d..d625389dd63 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/animal.py @@ -15,13 +15,29 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.cat import Cat +from petstore_api.models.dog import Dog class Animal(ModelNormal): @@ -46,6 +62,8 @@ class Animal(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,108 +75,165 @@ class Animal(ModelNormal): } discriminator_value_class_map = { - 'Dog': 'Dog', - 'Cat': 'Cat' + 'Dog': Dog, + 'Cat': Cat } openapi_types = { - 'class_name': 'str', - 'color': 'str' + 'class_name': (str,), # noqa: E501 + 'color': (str,), # noqa: E501 } validations = { } - def __init__(self, class_name=None, color='red'): # noqa: E501 - """Animal - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._class_name = None - self._color = None - self.discriminator = 'class_name' + discriminator = 'class_name' - self.class_name = class_name - if color is not None: - self.color = ( - color + def __init__(self, class_name, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Animal - a model defined in OpenAPI + + Args: + class_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('class_name', class_name) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def class_name(self): """Gets the class_name of this Animal. # noqa: E501 - - :return: The class_name of this Animal. # noqa: E501 - :rtype: str + Returns: + (str): The class_name of this Animal. # noqa: E501 """ - return self._class_name + return self.__get_item('class_name') @class_name.setter - def class_name(self, class_name): # noqa: E501 - """Sets the class_name of this Animal. - - - :param class_name: The class_name of this Animal. # noqa: E501 - :type: str + def class_name(self, value): + """Sets the class_name of this Animal. # noqa: E501 """ - if class_name is None: - raise ApiValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 - - self._class_name = ( - class_name - ) + return self.__set_item('class_name', value) @property def color(self): """Gets the color of this Animal. # noqa: E501 - - :return: The color of this Animal. # noqa: E501 - :rtype: str + Returns: + (str): The color of this Animal. # noqa: E501 """ - return self._color + return self.__get_item('color') @color.setter - def color(self, color): # noqa: E501 - """Sets the color of this Animal. - - - :param color: The color of this Animal. # noqa: E501 - :type: str + def color(self, value): + """Sets the color of this Animal. # noqa: E501 """ + return self.__set_item('color', value) - self._color = ( - color - ) - - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_key = self.attribute_map[self.discriminator] + @classmethod + def get_real_child_model(cls, data): + """Returns the real base class specified by the discriminator + We assume that data has javascript keys + """ + discriminator_key = cls.attribute_map[cls.discriminator] discriminator_value = data[discriminator_key] - return self.discriminator_value_class_map.get(discriminator_value) + return cls.discriminator_value_class_map.get(discriminator_value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -173,7 +248,22 @@ class Animal(ModelNormal): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py index 4f9f3a12bd4..40713b75479 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ApiResponse(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -58,127 +74,166 @@ class ApiResponse(ModelNormal): } openapi_types = { - 'code': 'int', - 'type': 'str', - 'message': 'str' + 'code': (int,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 } validations = { } - def __init__(self, code=None, type=None, message=None): # noqa: E501 - """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._code = None - self._type = None - self._message = None - self.discriminator = None + discriminator = None - if code is not None: - self.code = ( - code + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ApiResponse - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + code (int): [optional] # noqa: E501 + type (str): [optional] # noqa: E501 + message (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if type is not None: - self.type = ( - type + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if message is not None: - self.message = ( - message + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + @property def code(self): """Gets the code of this ApiResponse. # noqa: E501 - - :return: The code of this ApiResponse. # noqa: E501 - :rtype: int + Returns: + (int): The code of this ApiResponse. # noqa: E501 """ - return self._code + return self.__get_item('code') @code.setter - def code(self, code): # noqa: E501 - """Sets the code of this ApiResponse. - - - :param code: The code of this ApiResponse. # noqa: E501 - :type: int + def code(self, value): + """Sets the code of this ApiResponse. # noqa: E501 """ - - self._code = ( - code - ) + return self.__set_item('code', value) @property def type(self): """Gets the type of this ApiResponse. # noqa: E501 - - :return: The type of this ApiResponse. # noqa: E501 - :rtype: str + Returns: + (str): The type of this ApiResponse. # noqa: E501 """ - return self._type + return self.__get_item('type') @type.setter - def type(self, type): # noqa: E501 - """Sets the type of this ApiResponse. - - - :param type: The type of this ApiResponse. # noqa: E501 - :type: str + def type(self, value): + """Sets the type of this ApiResponse. # noqa: E501 """ - - self._type = ( - type - ) + return self.__set_item('type', value) @property def message(self): """Gets the message of this ApiResponse. # noqa: E501 - - :return: The message of this ApiResponse. # noqa: E501 - :rtype: str + Returns: + (str): The message of this ApiResponse. # noqa: E501 """ - return self._message + return self.__get_item('message') @message.setter - def message(self, message): # noqa: E501 - """Sets the message of this ApiResponse. - - - :param message: The message of this ApiResponse. # noqa: E501 - :type: str + def message(self, value): + """Sets the message of this ApiResponse. # noqa: E501 """ - - self._message = ( - message - ) + return self.__set_item('message', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -193,7 +248,22 @@ class ApiResponse(ModelNormal): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 2beb8772830..a2e3c7326a6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): } openapi_types = { - 'array_array_number': 'list[list[float]]' + 'array_array_number': ([[float]],), # noqa: E501 } validations = { } - def __init__(self, array_array_number=None): # noqa: E501 - """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._array_array_number = None - self.discriminator = None + discriminator = None - if array_array_number is not None: - self.array_array_number = ( - array_array_number + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + array_array_number ([[float]]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def array_array_number(self): """Gets the array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501 - - :return: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501 - :rtype: list[list[float]] + Returns: + ([[float]]): The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501 """ - return self._array_array_number + return self.__get_item('array_array_number') @array_array_number.setter - def array_array_number(self, array_array_number): # noqa: E501 - """Sets the array_array_number of this ArrayOfArrayOfNumberOnly. - - - :param array_array_number: The array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501 - :type: list[list[float]] + def array_array_number(self, value): + """Sets the array_array_number of this ArrayOfArrayOfNumberOnly. # noqa: E501 """ - - self._array_array_number = ( - array_array_number - ) + return self.__set_item('array_array_number', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index 7c67bcf59d7..c35c8e59631 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ArrayOfNumberOnly(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class ArrayOfNumberOnly(ModelNormal): } openapi_types = { - 'array_number': 'list[float]' + 'array_number': ([float],), # noqa: E501 } validations = { } - def __init__(self, array_number=None): # noqa: E501 - """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._array_number = None - self.discriminator = None + discriminator = None - if array_number is not None: - self.array_number = ( - array_number + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ArrayOfNumberOnly - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + array_number ([float]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def array_number(self): """Gets the array_number of this ArrayOfNumberOnly. # noqa: E501 - - :return: The array_number of this ArrayOfNumberOnly. # noqa: E501 - :rtype: list[float] + Returns: + ([float]): The array_number of this ArrayOfNumberOnly. # noqa: E501 """ - return self._array_number + return self.__get_item('array_number') @array_number.setter - def array_number(self, array_number): # noqa: E501 - """Sets the array_number of this ArrayOfNumberOnly. - - - :param array_number: The array_number of this ArrayOfNumberOnly. # noqa: E501 - :type: list[float] + def array_number(self, value): + """Sets the array_number of this ArrayOfNumberOnly. # noqa: E501 """ - - self._array_number = ( - array_number - ) + return self.__set_item('array_number', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class ArrayOfNumberOnly(ModelNormal): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py index adcb8690dea..cc52f04d318 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.read_only_first import ReadOnlyFirst class ArrayTest(ModelNormal): @@ -46,6 +61,8 @@ class ArrayTest(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -58,127 +75,166 @@ class ArrayTest(ModelNormal): } openapi_types = { - 'array_of_string': 'list[str]', - 'array_array_of_integer': 'list[list[int]]', - 'array_array_of_model': 'list[list[ReadOnlyFirst]]' + 'array_of_string': ([str],), # noqa: E501 + 'array_array_of_integer': ([[int]],), # noqa: E501 + 'array_array_of_model': ([[ReadOnlyFirst]],), # noqa: E501 } validations = { } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 - """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._array_of_string = None - self._array_array_of_integer = None - self._array_array_of_model = None - self.discriminator = None + discriminator = None - if array_of_string is not None: - self.array_of_string = ( - array_of_string + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ArrayTest - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + array_of_string ([str]): [optional] # noqa: E501 + array_array_of_integer ([[int]]): [optional] # noqa: E501 + array_array_of_model ([[ReadOnlyFirst]]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if array_array_of_integer is not None: - self.array_array_of_integer = ( - array_array_of_integer + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if array_array_of_model is not None: - self.array_array_of_model = ( - array_array_of_model + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + @property def array_of_string(self): """Gets the array_of_string of this ArrayTest. # noqa: E501 - - :return: The array_of_string of this ArrayTest. # noqa: E501 - :rtype: list[str] + Returns: + ([str]): The array_of_string of this ArrayTest. # noqa: E501 """ - return self._array_of_string + return self.__get_item('array_of_string') @array_of_string.setter - def array_of_string(self, array_of_string): # noqa: E501 - """Sets the array_of_string of this ArrayTest. - - - :param array_of_string: The array_of_string of this ArrayTest. # noqa: E501 - :type: list[str] + def array_of_string(self, value): + """Sets the array_of_string of this ArrayTest. # noqa: E501 """ - - self._array_of_string = ( - array_of_string - ) + return self.__set_item('array_of_string', value) @property def array_array_of_integer(self): """Gets the array_array_of_integer of this ArrayTest. # noqa: E501 - - :return: The array_array_of_integer of this ArrayTest. # noqa: E501 - :rtype: list[list[int]] + Returns: + ([[int]]): The array_array_of_integer of this ArrayTest. # noqa: E501 """ - return self._array_array_of_integer + return self.__get_item('array_array_of_integer') @array_array_of_integer.setter - def array_array_of_integer(self, array_array_of_integer): # noqa: E501 - """Sets the array_array_of_integer of this ArrayTest. - - - :param array_array_of_integer: The array_array_of_integer of this ArrayTest. # noqa: E501 - :type: list[list[int]] + def array_array_of_integer(self, value): + """Sets the array_array_of_integer of this ArrayTest. # noqa: E501 """ - - self._array_array_of_integer = ( - array_array_of_integer - ) + return self.__set_item('array_array_of_integer', value) @property def array_array_of_model(self): """Gets the array_array_of_model of this ArrayTest. # noqa: E501 - - :return: The array_array_of_model of this ArrayTest. # noqa: E501 - :rtype: list[list[ReadOnlyFirst]] + Returns: + ([[ReadOnlyFirst]]): The array_array_of_model of this ArrayTest. # noqa: E501 """ - return self._array_array_of_model + return self.__get_item('array_array_of_model') @array_array_of_model.setter - def array_array_of_model(self, array_array_of_model): # noqa: E501 - """Sets the array_array_of_model of this ArrayTest. - - - :param array_array_of_model: The array_array_of_model of this ArrayTest. # noqa: E501 - :type: list[list[ReadOnlyFirst]] + def array_array_of_model(self, value): + """Sets the array_array_of_model of this ArrayTest. # noqa: E501 """ - - self._array_array_of_model = ( - array_array_of_model - ) + return self.__set_item('array_array_of_model', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -193,7 +249,22 @@ class ArrayTest(ModelNormal): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py index 5eeafb5ac7b..9134f5e4251 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Capitalization(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -61,216 +77,219 @@ class Capitalization(ModelNormal): } openapi_types = { - 'small_camel': 'str', - 'capital_camel': 'str', - 'small_snake': 'str', - 'capital_snake': 'str', - 'sca_eth_flow_points': 'str', - 'att_name': 'str' + 'small_camel': (str,), # noqa: E501 + 'capital_camel': (str,), # noqa: E501 + 'small_snake': (str,), # noqa: E501 + 'capital_snake': (str,), # noqa: E501 + 'sca_eth_flow_points': (str,), # noqa: E501 + 'att_name': (str,), # noqa: E501 } validations = { } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 - """Capitalization - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._small_camel = None - self._capital_camel = None - self._small_snake = None - self._capital_snake = None - self._sca_eth_flow_points = None - self._att_name = None - self.discriminator = None + discriminator = None - if small_camel is not None: - self.small_camel = ( - small_camel + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Capitalization - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + small_camel (str): [optional] # noqa: E501 + capital_camel (str): [optional] # noqa: E501 + small_snake (str): [optional] # noqa: E501 + capital_snake (str): [optional] # noqa: E501 + sca_eth_flow_points (str): [optional] # noqa: E501 + att_name (str): Name of the pet . [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if capital_camel is not None: - self.capital_camel = ( - capital_camel + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if small_snake is not None: - self.small_snake = ( - small_snake + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if capital_snake is not None: - self.capital_snake = ( - capital_snake + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if sca_eth_flow_points is not None: - self.sca_eth_flow_points = ( - sca_eth_flow_points - ) - if att_name is not None: - self.att_name = ( - att_name + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def small_camel(self): """Gets the small_camel of this Capitalization. # noqa: E501 - - :return: The small_camel of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The small_camel of this Capitalization. # noqa: E501 """ - return self._small_camel + return self.__get_item('small_camel') @small_camel.setter - def small_camel(self, small_camel): # noqa: E501 - """Sets the small_camel of this Capitalization. - - - :param small_camel: The small_camel of this Capitalization. # noqa: E501 - :type: str + def small_camel(self, value): + """Sets the small_camel of this Capitalization. # noqa: E501 """ - - self._small_camel = ( - small_camel - ) + return self.__set_item('small_camel', value) @property def capital_camel(self): """Gets the capital_camel of this Capitalization. # noqa: E501 - - :return: The capital_camel of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The capital_camel of this Capitalization. # noqa: E501 """ - return self._capital_camel + return self.__get_item('capital_camel') @capital_camel.setter - def capital_camel(self, capital_camel): # noqa: E501 - """Sets the capital_camel of this Capitalization. - - - :param capital_camel: The capital_camel of this Capitalization. # noqa: E501 - :type: str + def capital_camel(self, value): + """Sets the capital_camel of this Capitalization. # noqa: E501 """ - - self._capital_camel = ( - capital_camel - ) + return self.__set_item('capital_camel', value) @property def small_snake(self): """Gets the small_snake of this Capitalization. # noqa: E501 - - :return: The small_snake of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The small_snake of this Capitalization. # noqa: E501 """ - return self._small_snake + return self.__get_item('small_snake') @small_snake.setter - def small_snake(self, small_snake): # noqa: E501 - """Sets the small_snake of this Capitalization. - - - :param small_snake: The small_snake of this Capitalization. # noqa: E501 - :type: str + def small_snake(self, value): + """Sets the small_snake of this Capitalization. # noqa: E501 """ - - self._small_snake = ( - small_snake - ) + return self.__set_item('small_snake', value) @property def capital_snake(self): """Gets the capital_snake of this Capitalization. # noqa: E501 - - :return: The capital_snake of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The capital_snake of this Capitalization. # noqa: E501 """ - return self._capital_snake + return self.__get_item('capital_snake') @capital_snake.setter - def capital_snake(self, capital_snake): # noqa: E501 - """Sets the capital_snake of this Capitalization. - - - :param capital_snake: The capital_snake of this Capitalization. # noqa: E501 - :type: str + def capital_snake(self, value): + """Sets the capital_snake of this Capitalization. # noqa: E501 """ - - self._capital_snake = ( - capital_snake - ) + return self.__set_item('capital_snake', value) @property def sca_eth_flow_points(self): """Gets the sca_eth_flow_points of this Capitalization. # noqa: E501 - - :return: The sca_eth_flow_points of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The sca_eth_flow_points of this Capitalization. # noqa: E501 """ - return self._sca_eth_flow_points + return self.__get_item('sca_eth_flow_points') @sca_eth_flow_points.setter - def sca_eth_flow_points(self, sca_eth_flow_points): # noqa: E501 - """Sets the sca_eth_flow_points of this Capitalization. - - - :param sca_eth_flow_points: The sca_eth_flow_points of this Capitalization. # noqa: E501 - :type: str + def sca_eth_flow_points(self, value): + """Sets the sca_eth_flow_points of this Capitalization. # noqa: E501 """ - - self._sca_eth_flow_points = ( - sca_eth_flow_points - ) + return self.__set_item('sca_eth_flow_points', value) @property def att_name(self): """Gets the att_name of this Capitalization. # noqa: E501 - Name of the pet # noqa: E501 - :return: The att_name of this Capitalization. # noqa: E501 - :rtype: str + Returns: + (str): The att_name of this Capitalization. # noqa: E501 """ - return self._att_name + return self.__get_item('att_name') @att_name.setter - def att_name(self, att_name): # noqa: E501 - """Sets the att_name of this Capitalization. - + def att_name(self, value): + """Sets the att_name of this Capitalization. # noqa: E501 Name of the pet # noqa: E501 - - :param att_name: The att_name of this Capitalization. # noqa: E501 - :type: str """ - - self._att_name = ( - att_name - ) + return self.__set_item('att_name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -285,7 +304,22 @@ class Capitalization(ModelNormal): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index b496a13fe98..40508dd3ce7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,79 +60,182 @@ class Cat(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { } attribute_map = { + 'class_name': 'className', # noqa: E501 + 'color': 'color', # noqa: E501 'declawed': 'declawed' # noqa: E501 } openapi_types = { - 'declawed': 'bool' + 'class_name': (str,), # noqa: E501 + 'color': (str,), # noqa: E501 + 'declawed': (bool,), # noqa: E501 } validations = { } - def __init__(self, declawed=None): # noqa: E501 - """Cat - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._declawed = None - self.discriminator = None + discriminator = None - if declawed is not None: - self.declawed = ( - declawed + def __init__(self, class_name, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Cat - a model defined in OpenAPI + + Args: + class_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + declawed (bool): [optional] # noqa: E501 + color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('class_name', class_name) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + + @property + def class_name(self): + """Gets the class_name of this Cat. # noqa: E501 + + Returns: + (str): The class_name of this Cat. # noqa: E501 + """ + return self.__get_item('class_name') + + @class_name.setter + def class_name(self, value): + """Sets the class_name of this Cat. # noqa: E501 + """ + return self.__set_item('class_name', value) + + @property + def color(self): + """Gets the color of this Cat. # noqa: E501 + + Returns: + (str): The color of this Cat. # noqa: E501 + """ + return self.__get_item('color') + + @color.setter + def color(self, value): + """Sets the color of this Cat. # noqa: E501 + """ + return self.__set_item('color', value) @property def declawed(self): """Gets the declawed of this Cat. # noqa: E501 - - :return: The declawed of this Cat. # noqa: E501 - :rtype: bool + Returns: + (bool): The declawed of this Cat. # noqa: E501 """ - return self._declawed + return self.__get_item('declawed') @declawed.setter - def declawed(self, declawed): # noqa: E501 - """Sets the declawed of this Cat. - - - :param declawed: The declawed of this Cat. # noqa: E501 - :type: bool + def declawed(self, value): + """Sets the declawed of this Cat. # noqa: E501 """ - - self._declawed = ( - declawed - ) + return self.__set_item('declawed', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +250,22 @@ class Cat(ModelNormal): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 0a8267293dd..cb1f0d815a0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class CatAllOf(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class CatAllOf(ModelNormal): } openapi_types = { - 'declawed': 'bool' + 'declawed': (bool,), # noqa: E501 } validations = { } - def __init__(self, declawed=None): # noqa: E501 - """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._declawed = None - self.discriminator = None + discriminator = None - if declawed is not None: - self.declawed = ( - declawed + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """CatAllOf - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + declawed (bool): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def declawed(self): """Gets the declawed of this CatAllOf. # noqa: E501 - - :return: The declawed of this CatAllOf. # noqa: E501 - :rtype: bool + Returns: + (bool): The declawed of this CatAllOf. # noqa: E501 """ - return self._declawed + return self.__get_item('declawed') @declawed.setter - def declawed(self, declawed): # noqa: E501 - """Sets the declawed of this CatAllOf. - - - :param declawed: The declawed of this CatAllOf. # noqa: E501 - :type: bool + def declawed(self, value): + """Sets the declawed of this CatAllOf. # noqa: E501 """ - - self._declawed = ( - declawed - ) + return self.__set_item('declawed', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class CatAllOf(ModelNormal): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/category.py b/samples/client/petstore/python-experimental/petstore_api/models/category.py index bf117a1317d..ca367ad9c3d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/category.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Category(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,97 +73,151 @@ class Category(ModelNormal): } openapi_types = { - 'id': 'int', - 'name': 'str' + 'id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, id=None, name='default-name'): # noqa: E501 - """Category - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._id = None - self._name = None - self.discriminator = None + discriminator = None - if id is not None: - self.id = ( - id + def __init__(self, name='default-name', _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Category - a model defined in OpenAPI + + Args: + + Keyword Args: + name (str): defaults to 'default-name', must be one of ['default-name'] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + id (int): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('name', name) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - self.name = name + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def id(self): """Gets the id of this Category. # noqa: E501 - - :return: The id of this Category. # noqa: E501 - :rtype: int + Returns: + (int): The id of this Category. # noqa: E501 """ - return self._id + return self.__get_item('id') @id.setter - def id(self, id): # noqa: E501 - """Sets the id of this Category. - - - :param id: The id of this Category. # noqa: E501 - :type: int + def id(self, value): + """Sets the id of this Category. # noqa: E501 """ - - self._id = ( - id - ) + return self.__set_item('id', value) @property def name(self): """Gets the name of this Category. # noqa: E501 - - :return: The name of this Category. # noqa: E501 - :rtype: str + Returns: + (str): The name of this Category. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this Category. - - - :param name: The name of this Category. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this Category. # noqa: E501 """ - if name is None: - raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -162,7 +232,22 @@ class Category(ModelNormal): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py index 907e0f6ce2d..b44cdb80aae 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ClassModel(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class ClassModel(ModelNormal): } openapi_types = { - '_class': 'str' + '_class': (str,), # noqa: E501 } validations = { } - def __init__(self, _class=None): # noqa: E501 - """ClassModel - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self.__class = None - self.discriminator = None + discriminator = None - if _class is not None: - self._class = ( - _class + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ClassModel - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _class (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def _class(self): """Gets the _class of this ClassModel. # noqa: E501 - - :return: The _class of this ClassModel. # noqa: E501 - :rtype: str + Returns: + (str): The _class of this ClassModel. # noqa: E501 """ - return self.__class + return self.__get_item('_class') @_class.setter - def _class(self, _class): # noqa: E501 - """Sets the _class of this ClassModel. - - - :param _class: The _class of this ClassModel. # noqa: E501 - :type: str + def _class(self, value): + """Sets the _class of this ClassModel. # noqa: E501 """ - - self.__class = ( - _class - ) + return self.__set_item('_class', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class ClassModel(ModelNormal): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/client.py b/samples/client/petstore/python-experimental/petstore_api/models/client.py index 7b133a38714..5e1699a2196 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/client.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Client(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class Client(ModelNormal): } openapi_types = { - 'client': 'str' + 'client': (str,), # noqa: E501 } validations = { } - def __init__(self, client=None): # noqa: E501 - """Client - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._client = None - self.discriminator = None + discriminator = None - if client is not None: - self.client = ( - client + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Client - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + client (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def client(self): """Gets the client of this Client. # noqa: E501 - - :return: The client of this Client. # noqa: E501 - :rtype: str + Returns: + (str): The client of this Client. # noqa: E501 """ - return self._client + return self.__get_item('client') @client.setter - def client(self, client): # noqa: E501 - """Sets the client of this Client. - - - :param client: The client of this Client. # noqa: E501 - :type: str + def client(self, value): + """Sets the client of this Client. # noqa: E501 """ - - self._client = ( - client - ) + return self.__set_item('client', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class Client(ModelNormal): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index 61ef9958fc4..bac013b867d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,79 +60,182 @@ class Dog(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { } attribute_map = { + 'class_name': 'className', # noqa: E501 + 'color': 'color', # noqa: E501 'breed': 'breed' # noqa: E501 } openapi_types = { - 'breed': 'str' + 'class_name': (str,), # noqa: E501 + 'color': (str,), # noqa: E501 + 'breed': (str,), # noqa: E501 } validations = { } - def __init__(self, breed=None): # noqa: E501 - """Dog - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._breed = None - self.discriminator = None + discriminator = None - if breed is not None: - self.breed = ( - breed + def __init__(self, class_name, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Dog - a model defined in OpenAPI + + Args: + class_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + breed (str): [optional] # noqa: E501 + color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('class_name', class_name) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + + @property + def class_name(self): + """Gets the class_name of this Dog. # noqa: E501 + + Returns: + (str): The class_name of this Dog. # noqa: E501 + """ + return self.__get_item('class_name') + + @class_name.setter + def class_name(self, value): + """Sets the class_name of this Dog. # noqa: E501 + """ + return self.__set_item('class_name', value) + + @property + def color(self): + """Gets the color of this Dog. # noqa: E501 + + Returns: + (str): The color of this Dog. # noqa: E501 + """ + return self.__get_item('color') + + @color.setter + def color(self, value): + """Sets the color of this Dog. # noqa: E501 + """ + return self.__set_item('color', value) @property def breed(self): """Gets the breed of this Dog. # noqa: E501 - - :return: The breed of this Dog. # noqa: E501 - :rtype: str + Returns: + (str): The breed of this Dog. # noqa: E501 """ - return self._breed + return self.__get_item('breed') @breed.setter - def breed(self, breed): # noqa: E501 - """Sets the breed of this Dog. - - - :param breed: The breed of this Dog. # noqa: E501 - :type: str + def breed(self, value): + """Sets the breed of this Dog. # noqa: E501 """ - - self._breed = ( - breed - ) + return self.__set_item('breed', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +250,22 @@ class Dog(ModelNormal): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index cc082b5b357..7d9a33bbe36 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class DogAllOf(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class DogAllOf(ModelNormal): } openapi_types = { - 'breed': 'str' + 'breed': (str,), # noqa: E501 } validations = { } - def __init__(self, breed=None): # noqa: E501 - """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._breed = None - self.discriminator = None + discriminator = None - if breed is not None: - self.breed = ( - breed + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """DogAllOf - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + breed (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def breed(self): """Gets the breed of this DogAllOf. # noqa: E501 - - :return: The breed of this DogAllOf. # noqa: E501 - :rtype: str + Returns: + (str): The breed of this DogAllOf. # noqa: E501 """ - return self._breed + return self.__get_item('breed') @breed.setter - def breed(self, breed): # noqa: E501 - """Sets the breed of this DogAllOf. - - - :param breed: The breed of this DogAllOf. # noqa: E501 - :type: str + def breed(self, value): + """Sets the breed of this DogAllOf. # noqa: E501 """ - - self._breed = ( - breed - ) + return self.__set_item('breed', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class DogAllOf(ModelNormal): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index fe8355e7def..477193e858f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,16 +60,18 @@ class EnumArrays(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('just_symbol',): { '>=': ">=", - '$': "$" + '$': "$", }, ('array_enum',): { 'FISH': "fish", - 'CRAB': "crab" + 'CRAB': "crab", }, } @@ -65,110 +81,149 @@ class EnumArrays(ModelNormal): } openapi_types = { - 'just_symbol': 'str', - 'array_enum': 'list[str]' + 'just_symbol': (str,), # noqa: E501 + 'array_enum': ([str],), # noqa: E501 } validations = { } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 - """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._just_symbol = None - self._array_enum = None - self.discriminator = None + discriminator = None - if just_symbol is not None: - self.just_symbol = ( - just_symbol + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """EnumArrays - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + just_symbol (str): [optional] # noqa: E501 + array_enum ([str]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if array_enum is not None: - self.array_enum = ( - array_enum + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def just_symbol(self): """Gets the just_symbol of this EnumArrays. # noqa: E501 - - :return: The just_symbol of this EnumArrays. # noqa: E501 - :rtype: str + Returns: + (str): The just_symbol of this EnumArrays. # noqa: E501 """ - return self._just_symbol + return self.__get_item('just_symbol') @just_symbol.setter - def just_symbol(self, just_symbol): # noqa: E501 - """Sets the just_symbol of this EnumArrays. - - - :param just_symbol: The just_symbol of this EnumArrays. # noqa: E501 - :type: str + def just_symbol(self, value): + """Sets the just_symbol of this EnumArrays. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('just_symbol',), - just_symbol, - self.validations - ) - - self._just_symbol = ( - just_symbol - ) + return self.__set_item('just_symbol', value) @property def array_enum(self): """Gets the array_enum of this EnumArrays. # noqa: E501 - - :return: The array_enum of this EnumArrays. # noqa: E501 - :rtype: list[str] + Returns: + ([str]): The array_enum of this EnumArrays. # noqa: E501 """ - return self._array_enum + return self.__get_item('array_enum') @array_enum.setter - def array_enum(self, array_enum): # noqa: E501 - """Sets the array_enum of this EnumArrays. - - - :param array_enum: The array_enum of this EnumArrays. # noqa: E501 - :type: list[str] + def array_enum(self, value): + """Sets the array_enum of this EnumArrays. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('array_enum',), - array_enum, - self.validations - ) - - self._array_enum = ( - array_enum - ) + return self.__set_item('array_enum', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -183,7 +238,22 @@ class EnumArrays(ModelNormal): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py index 60d4f64e9c1..0b3bca10a53 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -42,65 +56,147 @@ class EnumClass(ModelSimple): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('value',): { '_ABC': "_abc", '-EFG': "-efg", - '(XYZ)': "(xyz)" + '(XYZ)': "(xyz)", }, } openapi_types = { - 'value': 'str' + 'value': (str,), # noqa: E501 } validations = { } - def __init__(self, value='-efg'): # noqa: E501 - """EnumClass - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._value = None - self.discriminator = None + discriminator = None - self.value = value + def __init__(self, value='-efg', _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """EnumClass - a model defined in OpenAPI + + Args: + + Keyword Args: + value (str): defaults to '-efg', must be one of ['-efg'] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('value', value) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def value(self): """Gets the value of this EnumClass. # noqa: E501 - - :return: The value of this EnumClass. # noqa: E501 - :rtype: str + Returns: + (str): The value of this EnumClass. # noqa: E501 """ - return self._value + return self.__get_item('value') @value.setter - def value(self, value): # noqa: E501 - """Sets the value of this EnumClass. - - - :param value: The value of this EnumClass. # noqa: E501 - :type: str + def value(self, value): + """Sets the value of this EnumClass. # noqa: E501 """ - if value is None: - raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('value',), - value, - self.validations - ) - - self._value = ( - value - ) + return self.__set_item('value', value) def to_str(self): """Returns the string representation of the model""" - return str(self._value) + return str(self.value) def __repr__(self): """For `print` and `pprint`""" @@ -111,7 +207,19 @@ class EnumClass(ModelSimple): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not six.PY3 and len(types) == 2 and unicode in types: # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py index 0ec5096c0ab..83f6d78c3f8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.outer_enum import OuterEnum class EnumTest(ModelNormal): @@ -46,26 +61,28 @@ class EnumTest(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('enum_string',): { 'UPPER': "UPPER", 'LOWER': "lower", - 'EMPTY': "" + 'EMPTY': "", }, ('enum_string_required',): { 'UPPER': "UPPER", 'LOWER': "lower", - 'EMPTY': "" + 'EMPTY': "", }, ('enum_integer',): { '1': 1, - '-1': -1 + '-1': -1, }, ('enum_number',): { '1.1': 1.1, - '-1.2': -1.2 + '-1.2': -1.2, }, } @@ -78,208 +95,202 @@ class EnumTest(ModelNormal): } openapi_types = { - 'enum_string': 'str', - 'enum_string_required': 'str', - 'enum_integer': 'int', - 'enum_number': 'float', - 'outer_enum': 'OuterEnum' + 'enum_string': (str,), # noqa: E501 + 'enum_string_required': (str,), # noqa: E501 + 'enum_integer': (int,), # noqa: E501 + 'enum_number': (float,), # noqa: E501 + 'outer_enum': (OuterEnum,), # noqa: E501 } validations = { } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 - """EnumTest - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._enum_string = None - self._enum_string_required = None - self._enum_integer = None - self._enum_number = None - self._outer_enum = None - self.discriminator = None + discriminator = None - if enum_string is not None: - self.enum_string = ( - enum_string + def __init__(self, enum_string_required, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """EnumTest - a model defined in OpenAPI + + Args: + enum_string_required (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + enum_string (str): [optional] # noqa: E501 + enum_integer (int): [optional] # noqa: E501 + enum_number (float): [optional] # noqa: E501 + outer_enum (OuterEnum): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('enum_string_required', enum_string_required) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - self.enum_string_required = enum_string_required - if enum_integer is not None: - self.enum_integer = ( - enum_integer + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if enum_number is not None: - self.enum_number = ( - enum_number + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if outer_enum is not None: - self.outer_enum = ( - outer_enum + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def enum_string(self): """Gets the enum_string of this EnumTest. # noqa: E501 - - :return: The enum_string of this EnumTest. # noqa: E501 - :rtype: str + Returns: + (str): The enum_string of this EnumTest. # noqa: E501 """ - return self._enum_string + return self.__get_item('enum_string') @enum_string.setter - def enum_string(self, enum_string): # noqa: E501 - """Sets the enum_string of this EnumTest. - - - :param enum_string: The enum_string of this EnumTest. # noqa: E501 - :type: str + def enum_string(self, value): + """Sets the enum_string of this EnumTest. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('enum_string',), - enum_string, - self.validations - ) - - self._enum_string = ( - enum_string - ) + return self.__set_item('enum_string', value) @property def enum_string_required(self): """Gets the enum_string_required of this EnumTest. # noqa: E501 - - :return: The enum_string_required of this EnumTest. # noqa: E501 - :rtype: str + Returns: + (str): The enum_string_required of this EnumTest. # noqa: E501 """ - return self._enum_string_required + return self.__get_item('enum_string_required') @enum_string_required.setter - def enum_string_required(self, enum_string_required): # noqa: E501 - """Sets the enum_string_required of this EnumTest. - - - :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 - :type: str + def enum_string_required(self, value): + """Sets the enum_string_required of this EnumTest. # noqa: E501 """ - if enum_string_required is None: - raise ApiValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('enum_string_required',), - enum_string_required, - self.validations - ) - - self._enum_string_required = ( - enum_string_required - ) + return self.__set_item('enum_string_required', value) @property def enum_integer(self): """Gets the enum_integer of this EnumTest. # noqa: E501 - - :return: The enum_integer of this EnumTest. # noqa: E501 - :rtype: int + Returns: + (int): The enum_integer of this EnumTest. # noqa: E501 """ - return self._enum_integer + return self.__get_item('enum_integer') @enum_integer.setter - def enum_integer(self, enum_integer): # noqa: E501 - """Sets the enum_integer of this EnumTest. - - - :param enum_integer: The enum_integer of this EnumTest. # noqa: E501 - :type: int + def enum_integer(self, value): + """Sets the enum_integer of this EnumTest. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('enum_integer',), - enum_integer, - self.validations - ) - - self._enum_integer = ( - enum_integer - ) + return self.__set_item('enum_integer', value) @property def enum_number(self): """Gets the enum_number of this EnumTest. # noqa: E501 - - :return: The enum_number of this EnumTest. # noqa: E501 - :rtype: float + Returns: + (float): The enum_number of this EnumTest. # noqa: E501 """ - return self._enum_number + return self.__get_item('enum_number') @enum_number.setter - def enum_number(self, enum_number): # noqa: E501 - """Sets the enum_number of this EnumTest. - - - :param enum_number: The enum_number of this EnumTest. # noqa: E501 - :type: float + def enum_number(self, value): + """Sets the enum_number of this EnumTest. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('enum_number',), - enum_number, - self.validations - ) - - self._enum_number = ( - enum_number - ) + return self.__set_item('enum_number', value) @property def outer_enum(self): """Gets the outer_enum of this EnumTest. # noqa: E501 - - :return: The outer_enum of this EnumTest. # noqa: E501 - :rtype: OuterEnum + Returns: + (OuterEnum): The outer_enum of this EnumTest. # noqa: E501 """ - return self._outer_enum + return self.__get_item('outer_enum') @outer_enum.setter - def outer_enum(self, outer_enum): # noqa: E501 - """Sets the outer_enum of this EnumTest. - - - :param outer_enum: The outer_enum of this EnumTest. # noqa: E501 - :type: OuterEnum + def outer_enum(self, value): + """Sets the outer_enum of this EnumTest. # noqa: E501 """ - - self._outer_enum = ( - outer_enum - ) + return self.__set_item('outer_enum', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -294,7 +305,22 @@ class EnumTest(ModelNormal): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file.py b/samples/client/petstore/python-experimental/petstore_api/models/file.py index 6411e70e07b..7da4e025a20 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class File(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,71 +72,134 @@ class File(ModelNormal): } openapi_types = { - 'source_uri': 'str' + 'source_uri': (str,), # noqa: E501 } validations = { } - def __init__(self, source_uri=None): # noqa: E501 - """File - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._source_uri = None - self.discriminator = None + discriminator = None - if source_uri is not None: - self.source_uri = ( - source_uri + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """File - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + source_uri (str): Test capitalization. [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def source_uri(self): """Gets the source_uri of this File. # noqa: E501 - Test capitalization # noqa: E501 - :return: The source_uri of this File. # noqa: E501 - :rtype: str + Returns: + (str): The source_uri of this File. # noqa: E501 """ - return self._source_uri + return self.__get_item('source_uri') @source_uri.setter - def source_uri(self, source_uri): # noqa: E501 - """Sets the source_uri of this File. - + def source_uri(self, value): + """Sets the source_uri of this File. # noqa: E501 Test capitalization # noqa: E501 - - :param source_uri: The source_uri of this File. # noqa: E501 - :type: str """ - - self._source_uri = ( - source_uri - ) + return self.__set_item('source_uri', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -135,7 +214,22 @@ class File(ModelNormal): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index e773e2cb194..5e0ca0498d9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.file import File class FileSchemaTestClass(ModelNormal): @@ -46,6 +61,8 @@ class FileSchemaTestClass(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,98 +74,149 @@ class FileSchemaTestClass(ModelNormal): } openapi_types = { - 'file': 'File', - 'files': 'list[File]' + 'file': (File,), # noqa: E501 + 'files': ([File],), # noqa: E501 } validations = { } - def __init__(self, file=None, files=None): # noqa: E501 - """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._file = None - self._files = None - self.discriminator = None + discriminator = None - if file is not None: - self.file = ( - file + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """FileSchemaTestClass - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + file (File): [optional] # noqa: E501 + files ([File]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if files is not None: - self.files = ( - files + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def file(self): """Gets the file of this FileSchemaTestClass. # noqa: E501 - - :return: The file of this FileSchemaTestClass. # noqa: E501 - :rtype: File + Returns: + (File): The file of this FileSchemaTestClass. # noqa: E501 """ - return self._file + return self.__get_item('file') @file.setter - def file(self, file): # noqa: E501 - """Sets the file of this FileSchemaTestClass. - - - :param file: The file of this FileSchemaTestClass. # noqa: E501 - :type: File + def file(self, value): + """Sets the file of this FileSchemaTestClass. # noqa: E501 """ - - self._file = ( - file - ) + return self.__set_item('file', value) @property def files(self): """Gets the files of this FileSchemaTestClass. # noqa: E501 - - :return: The files of this FileSchemaTestClass. # noqa: E501 - :rtype: list[File] + Returns: + ([File]): The files of this FileSchemaTestClass. # noqa: E501 """ - return self._files + return self.__get_item('files') @files.setter - def files(self, files): # noqa: E501 - """Sets the files of this FileSchemaTestClass. - - - :param files: The files of this FileSchemaTestClass. # noqa: E501 - :type: list[File] + def files(self, value): + """Sets the files of this FileSchemaTestClass. # noqa: E501 """ - - self._files = ( - files - ) + return self.__set_item('files', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -163,7 +231,22 @@ class FileSchemaTestClass(ModelNormal): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py index 8b1a5143e01..de33c15695b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class FormatTest(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -68,56 +84,49 @@ class FormatTest(ModelNormal): } openapi_types = { - 'integer': 'int', - 'int32': 'int', - 'int64': 'int', - 'number': 'float', - 'float': 'float', - 'double': 'float', - 'string': 'str', - 'byte': 'str', - 'binary': 'file', - 'date': 'date', - 'date_time': 'datetime', - 'uuid': 'str', - 'password': 'str' + 'integer': (int,), # noqa: E501 + 'int32': (int,), # noqa: E501 + 'int64': (int,), # noqa: E501 + 'number': (float,), # noqa: E501 + 'float': (float,), # noqa: E501 + 'double': (float,), # noqa: E501 + 'string': (str,), # noqa: E501 + 'byte': (str,), # noqa: E501 + 'binary': (file_type,), # noqa: E501 + 'date': (date,), # noqa: E501 + 'date_time': (datetime,), # noqa: E501 + 'uuid': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 } validations = { ('integer',): { - 'inclusive_maximum': 100, 'inclusive_minimum': 10, }, ('int32',): { - 'inclusive_maximum': 200, 'inclusive_minimum': 20, }, ('number',): { - 'inclusive_maximum': 543.2, 'inclusive_minimum': 32.1, }, ('float',): { - 'inclusive_maximum': 987.6, 'inclusive_minimum': 54.3, }, ('double',): { - 'inclusive_maximum': 123.4, 'inclusive_minimum': 67.8, }, ('string',): { - 'regex': { 'pattern': r'^[a-z]+$', # noqa: E501 'flags': (re.IGNORECASE) }, }, ('byte',): { - 'regex': { 'pattern': r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', # noqa: E501 }, @@ -128,435 +137,323 @@ class FormatTest(ModelNormal): }, } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None): # noqa: E501 - """FormatTest - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._integer = None - self._int32 = None - self._int64 = None - self._number = None - self._float = None - self._double = None - self._string = None - self._byte = None - self._binary = None - self._date = None - self._date_time = None - self._uuid = None - self._password = None - self.discriminator = None + discriminator = None - if integer is not None: - self.integer = ( - integer + def __init__(self, number, byte, date, password, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """FormatTest - a model defined in OpenAPI + + Args: + number (float): + byte (str): + date (date): + password (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + integer (int): [optional] # noqa: E501 + int32 (int): [optional] # noqa: E501 + int64 (int): [optional] # noqa: E501 + float (float): [optional] # noqa: E501 + double (float): [optional] # noqa: E501 + string (str): [optional] # noqa: E501 + binary (file_type): [optional] # noqa: E501 + date_time (datetime): [optional] # noqa: E501 + uuid (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('number', number) + self.__set_item('byte', byte) + self.__set_item('date', date) + self.__set_item('password', password) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if int32 is not None: - self.int32 = ( - int32 + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if int64 is not None: - self.int64 = ( - int64 + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - self.number = number - if float is not None: - self.float = ( - float + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if double is not None: - self.double = ( - double + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) - if string is not None: - self.string = ( - string - ) - self.byte = byte - if binary is not None: - self.binary = ( - binary - ) - self.date = date - if date_time is not None: - self.date_time = ( - date_time - ) - if uuid is not None: - self.uuid = ( - uuid - ) - self.password = password + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def integer(self): """Gets the integer of this FormatTest. # noqa: E501 - - :return: The integer of this FormatTest. # noqa: E501 - :rtype: int + Returns: + (int): The integer of this FormatTest. # noqa: E501 """ - return self._integer + return self.__get_item('integer') @integer.setter - def integer(self, integer): # noqa: E501 - """Sets the integer of this FormatTest. - - - :param integer: The integer of this FormatTest. # noqa: E501 - :type: int + def integer(self, value): + """Sets the integer of this FormatTest. # noqa: E501 """ - check_validations( - self.validations, - ('integer',), - integer - ) - - self._integer = ( - integer - ) + return self.__set_item('integer', value) @property def int32(self): """Gets the int32 of this FormatTest. # noqa: E501 - - :return: The int32 of this FormatTest. # noqa: E501 - :rtype: int + Returns: + (int): The int32 of this FormatTest. # noqa: E501 """ - return self._int32 + return self.__get_item('int32') @int32.setter - def int32(self, int32): # noqa: E501 - """Sets the int32 of this FormatTest. - - - :param int32: The int32 of this FormatTest. # noqa: E501 - :type: int + def int32(self, value): + """Sets the int32 of this FormatTest. # noqa: E501 """ - check_validations( - self.validations, - ('int32',), - int32 - ) - - self._int32 = ( - int32 - ) + return self.__set_item('int32', value) @property def int64(self): """Gets the int64 of this FormatTest. # noqa: E501 - - :return: The int64 of this FormatTest. # noqa: E501 - :rtype: int + Returns: + (int): The int64 of this FormatTest. # noqa: E501 """ - return self._int64 + return self.__get_item('int64') @int64.setter - def int64(self, int64): # noqa: E501 - """Sets the int64 of this FormatTest. - - - :param int64: The int64 of this FormatTest. # noqa: E501 - :type: int + def int64(self, value): + """Sets the int64 of this FormatTest. # noqa: E501 """ - - self._int64 = ( - int64 - ) + return self.__set_item('int64', value) @property def number(self): """Gets the number of this FormatTest. # noqa: E501 - - :return: The number of this FormatTest. # noqa: E501 - :rtype: float + Returns: + (float): The number of this FormatTest. # noqa: E501 """ - return self._number + return self.__get_item('number') @number.setter - def number(self, number): # noqa: E501 - """Sets the number of this FormatTest. - - - :param number: The number of this FormatTest. # noqa: E501 - :type: float + def number(self, value): + """Sets the number of this FormatTest. # noqa: E501 """ - if number is None: - raise ApiValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - check_validations( - self.validations, - ('number',), - number - ) - - self._number = ( - number - ) + return self.__set_item('number', value) @property def float(self): """Gets the float of this FormatTest. # noqa: E501 - - :return: The float of this FormatTest. # noqa: E501 - :rtype: float + Returns: + (float): The float of this FormatTest. # noqa: E501 """ - return self._float + return self.__get_item('float') @float.setter - def float(self, float): # noqa: E501 - """Sets the float of this FormatTest. - - - :param float: The float of this FormatTest. # noqa: E501 - :type: float + def float(self, value): + """Sets the float of this FormatTest. # noqa: E501 """ - check_validations( - self.validations, - ('float',), - float - ) - - self._float = ( - float - ) + return self.__set_item('float', value) @property def double(self): """Gets the double of this FormatTest. # noqa: E501 - - :return: The double of this FormatTest. # noqa: E501 - :rtype: float + Returns: + (float): The double of this FormatTest. # noqa: E501 """ - return self._double + return self.__get_item('double') @double.setter - def double(self, double): # noqa: E501 - """Sets the double of this FormatTest. - - - :param double: The double of this FormatTest. # noqa: E501 - :type: float + def double(self, value): + """Sets the double of this FormatTest. # noqa: E501 """ - check_validations( - self.validations, - ('double',), - double - ) - - self._double = ( - double - ) + return self.__set_item('double', value) @property def string(self): """Gets the string of this FormatTest. # noqa: E501 - - :return: The string of this FormatTest. # noqa: E501 - :rtype: str + Returns: + (str): The string of this FormatTest. # noqa: E501 """ - return self._string + return self.__get_item('string') @string.setter - def string(self, string): # noqa: E501 - """Sets the string of this FormatTest. - - - :param string: The string of this FormatTest. # noqa: E501 - :type: str + def string(self, value): + """Sets the string of this FormatTest. # noqa: E501 """ - check_validations( - self.validations, - ('string',), - string - ) - - self._string = ( - string - ) + return self.__set_item('string', value) @property def byte(self): """Gets the byte of this FormatTest. # noqa: E501 - - :return: The byte of this FormatTest. # noqa: E501 - :rtype: str + Returns: + (str): The byte of this FormatTest. # noqa: E501 """ - return self._byte + return self.__get_item('byte') @byte.setter - def byte(self, byte): # noqa: E501 - """Sets the byte of this FormatTest. - - - :param byte: The byte of this FormatTest. # noqa: E501 - :type: str + def byte(self, value): + """Sets the byte of this FormatTest. # noqa: E501 """ - if byte is None: - raise ApiValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - check_validations( - self.validations, - ('byte',), - byte - ) - - self._byte = ( - byte - ) + return self.__set_item('byte', value) @property def binary(self): """Gets the binary of this FormatTest. # noqa: E501 - - :return: The binary of this FormatTest. # noqa: E501 - :rtype: file + Returns: + (file_type): The binary of this FormatTest. # noqa: E501 """ - return self._binary + return self.__get_item('binary') @binary.setter - def binary(self, binary): # noqa: E501 - """Sets the binary of this FormatTest. - - - :param binary: The binary of this FormatTest. # noqa: E501 - :type: file + def binary(self, value): + """Sets the binary of this FormatTest. # noqa: E501 """ - - self._binary = ( - binary - ) + return self.__set_item('binary', value) @property def date(self): """Gets the date of this FormatTest. # noqa: E501 - - :return: The date of this FormatTest. # noqa: E501 - :rtype: date + Returns: + (date): The date of this FormatTest. # noqa: E501 """ - return self._date + return self.__get_item('date') @date.setter - def date(self, date): # noqa: E501 - """Sets the date of this FormatTest. - - - :param date: The date of this FormatTest. # noqa: E501 - :type: date + def date(self, value): + """Sets the date of this FormatTest. # noqa: E501 """ - if date is None: - raise ApiValueError("Invalid value for `date`, must not be `None`") # noqa: E501 - - self._date = ( - date - ) + return self.__set_item('date', value) @property def date_time(self): """Gets the date_time of this FormatTest. # noqa: E501 - - :return: The date_time of this FormatTest. # noqa: E501 - :rtype: datetime + Returns: + (datetime): The date_time of this FormatTest. # noqa: E501 """ - return self._date_time + return self.__get_item('date_time') @date_time.setter - def date_time(self, date_time): # noqa: E501 - """Sets the date_time of this FormatTest. - - - :param date_time: The date_time of this FormatTest. # noqa: E501 - :type: datetime + def date_time(self, value): + """Sets the date_time of this FormatTest. # noqa: E501 """ - - self._date_time = ( - date_time - ) + return self.__set_item('date_time', value) @property def uuid(self): """Gets the uuid of this FormatTest. # noqa: E501 - - :return: The uuid of this FormatTest. # noqa: E501 - :rtype: str + Returns: + (str): The uuid of this FormatTest. # noqa: E501 """ - return self._uuid + return self.__get_item('uuid') @uuid.setter - def uuid(self, uuid): # noqa: E501 - """Sets the uuid of this FormatTest. - - - :param uuid: The uuid of this FormatTest. # noqa: E501 - :type: str + def uuid(self, value): + """Sets the uuid of this FormatTest. # noqa: E501 """ - - self._uuid = ( - uuid - ) + return self.__set_item('uuid', value) @property def password(self): """Gets the password of this FormatTest. # noqa: E501 - - :return: The password of this FormatTest. # noqa: E501 - :rtype: str + Returns: + (str): The password of this FormatTest. # noqa: E501 """ - return self._password + return self.__get_item('password') @password.setter - def password(self, password): # noqa: E501 - """Sets the password of this FormatTest. - - - :param password: The password of this FormatTest. # noqa: E501 - :type: str + def password(self, value): + """Sets the password of this FormatTest. # noqa: E501 """ - if password is None: - raise ApiValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - check_validations( - self.validations, - ('password',), - password - ) - - self._password = ( - password - ) + return self.__set_item('password', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -571,7 +468,22 @@ class FormatTest(ModelNormal): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 2ef64381ea3..ecf201d21e8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class HasOnlyReadOnly(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,98 +73,149 @@ class HasOnlyReadOnly(ModelNormal): } openapi_types = { - 'bar': 'str', - 'foo': 'str' + 'bar': (str,), # noqa: E501 + 'foo': (str,), # noqa: E501 } validations = { } - def __init__(self, bar=None, foo=None): # noqa: E501 - """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._bar = None - self._foo = None - self.discriminator = None + discriminator = None - if bar is not None: - self.bar = ( - bar + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """HasOnlyReadOnly - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + bar (str): [optional] # noqa: E501 + foo (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if foo is not None: - self.foo = ( - foo + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def bar(self): """Gets the bar of this HasOnlyReadOnly. # noqa: E501 - - :return: The bar of this HasOnlyReadOnly. # noqa: E501 - :rtype: str + Returns: + (str): The bar of this HasOnlyReadOnly. # noqa: E501 """ - return self._bar + return self.__get_item('bar') @bar.setter - def bar(self, bar): # noqa: E501 - """Sets the bar of this HasOnlyReadOnly. - - - :param bar: The bar of this HasOnlyReadOnly. # noqa: E501 - :type: str + def bar(self, value): + """Sets the bar of this HasOnlyReadOnly. # noqa: E501 """ - - self._bar = ( - bar - ) + return self.__set_item('bar', value) @property def foo(self): """Gets the foo of this HasOnlyReadOnly. # noqa: E501 - - :return: The foo of this HasOnlyReadOnly. # noqa: E501 - :rtype: str + Returns: + (str): The foo of this HasOnlyReadOnly. # noqa: E501 """ - return self._foo + return self.__get_item('foo') @foo.setter - def foo(self, foo): # noqa: E501 - """Sets the foo of this HasOnlyReadOnly. - - - :param foo: The foo of this HasOnlyReadOnly. # noqa: E501 - :type: str + def foo(self, value): + """Sets the foo of this HasOnlyReadOnly. # noqa: E501 """ - - self._foo = ( - foo - ) + return self.__set_item('foo', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -163,7 +230,22 @@ class HasOnlyReadOnly(ModelNormal): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/list.py b/samples/client/petstore/python-experimental/petstore_api/models/list.py index 388989603a9..79ff6c81bed 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/list.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class List(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class List(ModelNormal): } openapi_types = { - '_123_list': 'str' + '_123_list': (str,), # noqa: E501 } validations = { } - def __init__(self, _123_list=None): # noqa: E501 - """List - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self.__123_list = None - self.discriminator = None + discriminator = None - if _123_list is not None: - self._123_list = ( - _123_list + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """List - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _123_list (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def _123_list(self): """Gets the _123_list of this List. # noqa: E501 - - :return: The _123_list of this List. # noqa: E501 - :rtype: str + Returns: + (str): The _123_list of this List. # noqa: E501 """ - return self.__123_list + return self.__get_item('_123_list') @_123_list.setter - def _123_list(self, _123_list): # noqa: E501 - """Sets the _123_list of this List. - - - :param _123_list: The _123_list of this List. # noqa: E501 - :type: str + def _123_list(self, value): + """Sets the _123_list of this List. # noqa: E501 """ - - self.__123_list = ( - _123_list - ) + return self.__set_item('_123_list', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class List(ModelNormal): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py index 17179143504..84b07abdcc8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.string_boolean_map import StringBooleanMap class MapTest(ModelNormal): @@ -46,12 +61,14 @@ class MapTest(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('map_of_enum_string',): { 'UPPER': "UPPER", - 'LOWER': "lower" + 'LOWER': "lower", }, } @@ -63,162 +80,183 @@ class MapTest(ModelNormal): } openapi_types = { - 'map_map_of_string': 'dict(str, dict(str, str))', - 'map_of_enum_string': 'dict(str, str)', - 'direct_map': 'dict(str, bool)', - 'indirect_map': 'StringBooleanMap' + 'map_map_of_string': ({str: ({str: (str,)},)},), # noqa: E501 + 'map_of_enum_string': ({str: (str,)},), # noqa: E501 + 'direct_map': ({str: (bool,)},), # noqa: E501 + 'indirect_map': (StringBooleanMap,), # noqa: E501 } validations = { } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 - """MapTest - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._map_map_of_string = None - self._map_of_enum_string = None - self._direct_map = None - self._indirect_map = None - self.discriminator = None + discriminator = None - if map_map_of_string is not None: - self.map_map_of_string = ( - map_map_of_string + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """MapTest - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + map_map_of_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 + map_of_enum_string ({str: (str,)}): [optional] # noqa: E501 + direct_map ({str: (bool,)}): [optional] # noqa: E501 + indirect_map (StringBooleanMap): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if map_of_enum_string is not None: - self.map_of_enum_string = ( - map_of_enum_string + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if direct_map is not None: - self.direct_map = ( - direct_map + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if indirect_map is not None: - self.indirect_map = ( - indirect_map + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def map_map_of_string(self): """Gets the map_map_of_string of this MapTest. # noqa: E501 - - :return: The map_map_of_string of this MapTest. # noqa: E501 - :rtype: dict(str, dict(str, str)) + Returns: + ({str: ({str: (str,)},)}): The map_map_of_string of this MapTest. # noqa: E501 """ - return self._map_map_of_string + return self.__get_item('map_map_of_string') @map_map_of_string.setter - def map_map_of_string(self, map_map_of_string): # noqa: E501 - """Sets the map_map_of_string of this MapTest. - - - :param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501 - :type: dict(str, dict(str, str)) + def map_map_of_string(self, value): + """Sets the map_map_of_string of this MapTest. # noqa: E501 """ - - self._map_map_of_string = ( - map_map_of_string - ) + return self.__set_item('map_map_of_string', value) @property def map_of_enum_string(self): """Gets the map_of_enum_string of this MapTest. # noqa: E501 - - :return: The map_of_enum_string of this MapTest. # noqa: E501 - :rtype: dict(str, str) + Returns: + ({str: (str,)}): The map_of_enum_string of this MapTest. # noqa: E501 """ - return self._map_of_enum_string + return self.__get_item('map_of_enum_string') @map_of_enum_string.setter - def map_of_enum_string(self, map_of_enum_string): # noqa: E501 - """Sets the map_of_enum_string of this MapTest. - - - :param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501 - :type: dict(str, str) + def map_of_enum_string(self, value): + """Sets the map_of_enum_string of this MapTest. # noqa: E501 """ - check_allowed_values( - self.allowed_values, - ('map_of_enum_string',), - map_of_enum_string, - self.validations - ) - - self._map_of_enum_string = ( - map_of_enum_string - ) + return self.__set_item('map_of_enum_string', value) @property def direct_map(self): """Gets the direct_map of this MapTest. # noqa: E501 - - :return: The direct_map of this MapTest. # noqa: E501 - :rtype: dict(str, bool) + Returns: + ({str: (bool,)}): The direct_map of this MapTest. # noqa: E501 """ - return self._direct_map + return self.__get_item('direct_map') @direct_map.setter - def direct_map(self, direct_map): # noqa: E501 - """Sets the direct_map of this MapTest. - - - :param direct_map: The direct_map of this MapTest. # noqa: E501 - :type: dict(str, bool) + def direct_map(self, value): + """Sets the direct_map of this MapTest. # noqa: E501 """ - - self._direct_map = ( - direct_map - ) + return self.__set_item('direct_map', value) @property def indirect_map(self): """Gets the indirect_map of this MapTest. # noqa: E501 - - :return: The indirect_map of this MapTest. # noqa: E501 - :rtype: StringBooleanMap + Returns: + (StringBooleanMap): The indirect_map of this MapTest. # noqa: E501 """ - return self._indirect_map + return self.__get_item('indirect_map') @indirect_map.setter - def indirect_map(self, indirect_map): # noqa: E501 - """Sets the indirect_map of this MapTest. - - - :param indirect_map: The indirect_map of this MapTest. # noqa: E501 - :type: StringBooleanMap + def indirect_map(self, value): + """Sets the indirect_map of this MapTest. # noqa: E501 """ - - self._indirect_map = ( - indirect_map - ) + return self.__set_item('indirect_map', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -233,7 +271,22 @@ class MapTest(ModelNormal): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index 670e5d9905e..a8f9efb4297 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.animal import Animal class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): @@ -46,6 +61,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -58,127 +75,166 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): } openapi_types = { - 'uuid': 'str', - 'date_time': 'datetime', - 'map': 'dict(str, Animal)' + 'uuid': (str,), # noqa: E501 + 'date_time': (datetime,), # noqa: E501 + 'map': ({str: (Animal,)},), # noqa: E501 } validations = { } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 - """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._uuid = None - self._date_time = None - self._map = None - self.discriminator = None + discriminator = None - if uuid is not None: - self.uuid = ( - uuid + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + uuid (str): [optional] # noqa: E501 + date_time (datetime): [optional] # noqa: E501 + map ({str: (Animal,)}): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if date_time is not None: - self.date_time = ( - date_time + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if map is not None: - self.map = ( - map + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + @property def uuid(self): """Gets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - - :return: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :rtype: str + Returns: + (str): The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - return self._uuid + return self.__get_item('uuid') @uuid.setter - def uuid(self, uuid): # noqa: E501 - """Sets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. - - - :param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :type: str + def uuid(self, value): + """Sets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - - self._uuid = ( - uuid - ) + return self.__set_item('uuid', value) @property def date_time(self): """Gets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - - :return: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :rtype: datetime + Returns: + (datetime): The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - return self._date_time + return self.__get_item('date_time') @date_time.setter - def date_time(self, date_time): # noqa: E501 - """Sets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. - - - :param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :type: datetime + def date_time(self, value): + """Sets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - - self._date_time = ( - date_time - ) + return self.__set_item('date_time', value) @property def map(self): """Gets the map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - - :return: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :rtype: dict(str, Animal) + Returns: + ({str: (Animal,)}): The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - return self._map + return self.__get_item('map') @map.setter - def map(self, map): # noqa: E501 - """Sets the map of this MixedPropertiesAndAdditionalPropertiesClass. - - - :param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 - :type: dict(str, Animal) + def map(self, value): + """Sets the map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501 """ - - self._map = ( - map - ) + return self.__set_item('map', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -193,7 +249,22 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py index f110d020825..4bb72561e84 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Model200Response(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,98 +73,149 @@ class Model200Response(ModelNormal): } openapi_types = { - 'name': 'int', - '_class': 'str' + 'name': (int,), # noqa: E501 + '_class': (str,), # noqa: E501 } validations = { } - def __init__(self, name=None, _class=None): # noqa: E501 - """Model200Response - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._name = None - self.__class = None - self.discriminator = None + discriminator = None - if name is not None: - self.name = ( - name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Model200Response - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + name (int): [optional] # noqa: E501 + _class (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if _class is not None: - self._class = ( - _class + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def name(self): """Gets the name of this Model200Response. # noqa: E501 - - :return: The name of this Model200Response. # noqa: E501 - :rtype: int + Returns: + (int): The name of this Model200Response. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this Model200Response. - - - :param name: The name of this Model200Response. # noqa: E501 - :type: int + def name(self, value): + """Sets the name of this Model200Response. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) @property def _class(self): """Gets the _class of this Model200Response. # noqa: E501 - - :return: The _class of this Model200Response. # noqa: E501 - :rtype: str + Returns: + (str): The _class of this Model200Response. # noqa: E501 """ - return self.__class + return self.__get_item('_class') @_class.setter - def _class(self, _class): # noqa: E501 - """Sets the _class of this Model200Response. - - - :param _class: The _class of this Model200Response. # noqa: E501 - :type: str + def _class(self, value): + """Sets the _class of this Model200Response. # noqa: E501 """ - - self.__class = ( - _class - ) + return self.__set_item('_class', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -163,7 +230,22 @@ class Model200Response(ModelNormal): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py index 0ba8ad99b99..1ca322750bf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ModelReturn(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class ModelReturn(ModelNormal): } openapi_types = { - '_return': 'int' + '_return': (int,), # noqa: E501 } validations = { } - def __init__(self, _return=None): # noqa: E501 - """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self.__return = None - self.discriminator = None + discriminator = None - if _return is not None: - self._return = ( - _return + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ModelReturn - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _return (int): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def _return(self): """Gets the _return of this ModelReturn. # noqa: E501 - - :return: The _return of this ModelReturn. # noqa: E501 - :rtype: int + Returns: + (int): The _return of this ModelReturn. # noqa: E501 """ - return self.__return + return self.__get_item('_return') @_return.setter - def _return(self, _return): # noqa: E501 - """Sets the _return of this ModelReturn. - - - :param _return: The _return of this ModelReturn. # noqa: E501 - :type: int + def _return(self, value): + """Sets the _return of this ModelReturn. # noqa: E501 """ - - self.__return = ( - _return - ) + return self.__set_item('_return', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class ModelReturn(ModelNormal): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/name.py b/samples/client/petstore/python-experimental/petstore_api/models/name.py index 59c5429366d..b4c205ae08c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/name.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Name(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -59,155 +75,185 @@ class Name(ModelNormal): } openapi_types = { - 'name': 'int', - 'snake_case': 'int', - '_property': 'str', - '_123_number': 'int' + 'name': (int,), # noqa: E501 + 'snake_case': (int,), # noqa: E501 + '_property': (str,), # noqa: E501 + '_123_number': (int,), # noqa: E501 } validations = { } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 - """Name - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._name = None - self._snake_case = None - self.__property = None - self.__123_number = None - self.discriminator = None + discriminator = None - self.name = name - if snake_case is not None: - self.snake_case = ( - snake_case + def __init__(self, name, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Name - a model defined in OpenAPI + + Args: + name (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + snake_case (int): [optional] # noqa: E501 + _property (str): [optional] # noqa: E501 + _123_number (int): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('name', name) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if _property is not None: - self._property = ( - _property + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if _123_number is not None: - self._123_number = ( - _123_number + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + @property def name(self): """Gets the name of this Name. # noqa: E501 - - :return: The name of this Name. # noqa: E501 - :rtype: int + Returns: + (int): The name of this Name. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this Name. - - - :param name: The name of this Name. # noqa: E501 - :type: int + def name(self, value): + """Sets the name of this Name. # noqa: E501 """ - if name is None: - raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = ( - name - ) + return self.__set_item('name', value) @property def snake_case(self): """Gets the snake_case of this Name. # noqa: E501 - - :return: The snake_case of this Name. # noqa: E501 - :rtype: int + Returns: + (int): The snake_case of this Name. # noqa: E501 """ - return self._snake_case + return self.__get_item('snake_case') @snake_case.setter - def snake_case(self, snake_case): # noqa: E501 - """Sets the snake_case of this Name. - - - :param snake_case: The snake_case of this Name. # noqa: E501 - :type: int + def snake_case(self, value): + """Sets the snake_case of this Name. # noqa: E501 """ - - self._snake_case = ( - snake_case - ) + return self.__set_item('snake_case', value) @property def _property(self): """Gets the _property of this Name. # noqa: E501 - - :return: The _property of this Name. # noqa: E501 - :rtype: str + Returns: + (str): The _property of this Name. # noqa: E501 """ - return self.__property + return self.__get_item('_property') @_property.setter - def _property(self, _property): # noqa: E501 - """Sets the _property of this Name. - - - :param _property: The _property of this Name. # noqa: E501 - :type: str + def _property(self, value): + """Sets the _property of this Name. # noqa: E501 """ - - self.__property = ( - _property - ) + return self.__set_item('_property', value) @property def _123_number(self): """Gets the _123_number of this Name. # noqa: E501 - - :return: The _123_number of this Name. # noqa: E501 - :rtype: int + Returns: + (int): The _123_number of this Name. # noqa: E501 """ - return self.__123_number + return self.__get_item('_123_number') @_123_number.setter - def _123_number(self, _123_number): # noqa: E501 - """Sets the _123_number of this Name. - - - :param _123_number: The _123_number of this Name. # noqa: E501 - :type: int + def _123_number(self, value): + """Sets the _123_number of this Name. # noqa: E501 """ - - self.__123_number = ( - _123_number - ) + return self.__set_item('_123_number', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -222,7 +268,22 @@ class Name(ModelNormal): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py index cb782561873..0761b3d3e32 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class NumberOnly(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class NumberOnly(ModelNormal): } openapi_types = { - 'just_number': 'float' + 'just_number': (float,), # noqa: E501 } validations = { } - def __init__(self, just_number=None): # noqa: E501 - """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._just_number = None - self.discriminator = None + discriminator = None - if just_number is not None: - self.just_number = ( - just_number + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """NumberOnly - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + just_number (float): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def just_number(self): """Gets the just_number of this NumberOnly. # noqa: E501 - - :return: The just_number of this NumberOnly. # noqa: E501 - :rtype: float + Returns: + (float): The just_number of this NumberOnly. # noqa: E501 """ - return self._just_number + return self.__get_item('just_number') @just_number.setter - def just_number(self, just_number): # noqa: E501 - """Sets the just_number of this NumberOnly. - - - :param just_number: The just_number of this NumberOnly. # noqa: E501 - :type: float + def just_number(self, value): + """Sets the just_number of this NumberOnly. # noqa: E501 """ - - self._just_number = ( - just_number - ) + return self.__set_item('just_number', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class NumberOnly(ModelNormal): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/order.py b/samples/client/petstore/python-experimental/petstore_api/models/order.py index 7b866df4c89..64c84902aba 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/order.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,13 +60,15 @@ class Order(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('status',): { 'PLACED': "placed", 'APPROVED': "approved", - 'DELIVERED': "delivered" + 'DELIVERED': "delivered", }, } @@ -66,222 +82,219 @@ class Order(ModelNormal): } openapi_types = { - 'id': 'int', - 'pet_id': 'int', - 'quantity': 'int', - 'ship_date': 'datetime', - 'status': 'str', - 'complete': 'bool' + 'id': (int,), # noqa: E501 + 'pet_id': (int,), # noqa: E501 + 'quantity': (int,), # noqa: E501 + 'ship_date': (datetime,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'complete': (bool,), # noqa: E501 } validations = { } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 - """Order - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._id = None - self._pet_id = None - self._quantity = None - self._ship_date = None - self._status = None - self._complete = None - self.discriminator = None + discriminator = None - if id is not None: - self.id = ( - id + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Order - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + id (int): [optional] # noqa: E501 + pet_id (int): [optional] # noqa: E501 + quantity (int): [optional] # noqa: E501 + ship_date (datetime): [optional] # noqa: E501 + status (str): Order Status. [optional] # noqa: E501 + complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if pet_id is not None: - self.pet_id = ( - pet_id + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if quantity is not None: - self.quantity = ( - quantity + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if ship_date is not None: - self.ship_date = ( - ship_date + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if status is not None: - self.status = ( - status - ) - if complete is not None: - self.complete = ( - complete + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def id(self): """Gets the id of this Order. # noqa: E501 - - :return: The id of this Order. # noqa: E501 - :rtype: int + Returns: + (int): The id of this Order. # noqa: E501 """ - return self._id + return self.__get_item('id') @id.setter - def id(self, id): # noqa: E501 - """Sets the id of this Order. - - - :param id: The id of this Order. # noqa: E501 - :type: int + def id(self, value): + """Sets the id of this Order. # noqa: E501 """ - - self._id = ( - id - ) + return self.__set_item('id', value) @property def pet_id(self): """Gets the pet_id of this Order. # noqa: E501 - - :return: The pet_id of this Order. # noqa: E501 - :rtype: int + Returns: + (int): The pet_id of this Order. # noqa: E501 """ - return self._pet_id + return self.__get_item('pet_id') @pet_id.setter - def pet_id(self, pet_id): # noqa: E501 - """Sets the pet_id of this Order. - - - :param pet_id: The pet_id of this Order. # noqa: E501 - :type: int + def pet_id(self, value): + """Sets the pet_id of this Order. # noqa: E501 """ - - self._pet_id = ( - pet_id - ) + return self.__set_item('pet_id', value) @property def quantity(self): """Gets the quantity of this Order. # noqa: E501 - - :return: The quantity of this Order. # noqa: E501 - :rtype: int + Returns: + (int): The quantity of this Order. # noqa: E501 """ - return self._quantity + return self.__get_item('quantity') @quantity.setter - def quantity(self, quantity): # noqa: E501 - """Sets the quantity of this Order. - - - :param quantity: The quantity of this Order. # noqa: E501 - :type: int + def quantity(self, value): + """Sets the quantity of this Order. # noqa: E501 """ - - self._quantity = ( - quantity - ) + return self.__set_item('quantity', value) @property def ship_date(self): """Gets the ship_date of this Order. # noqa: E501 - - :return: The ship_date of this Order. # noqa: E501 - :rtype: datetime + Returns: + (datetime): The ship_date of this Order. # noqa: E501 """ - return self._ship_date + return self.__get_item('ship_date') @ship_date.setter - def ship_date(self, ship_date): # noqa: E501 - """Sets the ship_date of this Order. - - - :param ship_date: The ship_date of this Order. # noqa: E501 - :type: datetime + def ship_date(self, value): + """Sets the ship_date of this Order. # noqa: E501 """ - - self._ship_date = ( - ship_date - ) + return self.__set_item('ship_date', value) @property def status(self): """Gets the status of this Order. # noqa: E501 - Order Status # noqa: E501 - :return: The status of this Order. # noqa: E501 - :rtype: str + Returns: + (str): The status of this Order. # noqa: E501 """ - return self._status + return self.__get_item('status') @status.setter - def status(self, status): # noqa: E501 - """Sets the status of this Order. - + def status(self, value): + """Sets the status of this Order. # noqa: E501 Order Status # noqa: E501 - - :param status: The status of this Order. # noqa: E501 - :type: str """ - check_allowed_values( - self.allowed_values, - ('status',), - status, - self.validations - ) - - self._status = ( - status - ) + return self.__set_item('status', value) @property def complete(self): """Gets the complete of this Order. # noqa: E501 - - :return: The complete of this Order. # noqa: E501 - :rtype: bool + Returns: + (bool): The complete of this Order. # noqa: E501 """ - return self._complete + return self.__get_item('complete') @complete.setter - def complete(self, complete): # noqa: E501 - """Sets the complete of this Order. - - - :param complete: The complete of this Order. # noqa: E501 - :type: bool + def complete(self, value): + """Sets the complete of this Order. # noqa: E501 """ - - self._complete = ( - complete - ) + return self.__set_item('complete', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -296,7 +309,22 @@ class Order(ModelNormal): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py index 70c9e7915fb..61bc5054575 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -15,13 +15,28 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.outer_number import OuterNumber class OuterComposite(ModelNormal): @@ -46,6 +61,8 @@ class OuterComposite(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -58,127 +75,166 @@ class OuterComposite(ModelNormal): } openapi_types = { - 'my_number': 'OuterNumber', - 'my_string': 'str', - 'my_boolean': 'bool' + 'my_number': (OuterNumber,), # noqa: E501 + 'my_string': (str,), # noqa: E501 + 'my_boolean': (bool,), # noqa: E501 } validations = { } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 - """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._my_number = None - self._my_string = None - self._my_boolean = None - self.discriminator = None + discriminator = None - if my_number is not None: - self.my_number = ( - my_number + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """OuterComposite - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + my_number (OuterNumber): [optional] # noqa: E501 + my_string (str): [optional] # noqa: E501 + my_boolean (bool): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if my_string is not None: - self.my_string = ( - my_string + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if my_boolean is not None: - self.my_boolean = ( - my_boolean + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) + @property def my_number(self): """Gets the my_number of this OuterComposite. # noqa: E501 - - :return: The my_number of this OuterComposite. # noqa: E501 - :rtype: OuterNumber + Returns: + (OuterNumber): The my_number of this OuterComposite. # noqa: E501 """ - return self._my_number + return self.__get_item('my_number') @my_number.setter - def my_number(self, my_number): # noqa: E501 - """Sets the my_number of this OuterComposite. - - - :param my_number: The my_number of this OuterComposite. # noqa: E501 - :type: OuterNumber + def my_number(self, value): + """Sets the my_number of this OuterComposite. # noqa: E501 """ - - self._my_number = ( - my_number - ) + return self.__set_item('my_number', value) @property def my_string(self): """Gets the my_string of this OuterComposite. # noqa: E501 - - :return: The my_string of this OuterComposite. # noqa: E501 - :rtype: str + Returns: + (str): The my_string of this OuterComposite. # noqa: E501 """ - return self._my_string + return self.__get_item('my_string') @my_string.setter - def my_string(self, my_string): # noqa: E501 - """Sets the my_string of this OuterComposite. - - - :param my_string: The my_string of this OuterComposite. # noqa: E501 - :type: str + def my_string(self, value): + """Sets the my_string of this OuterComposite. # noqa: E501 """ - - self._my_string = ( - my_string - ) + return self.__set_item('my_string', value) @property def my_boolean(self): """Gets the my_boolean of this OuterComposite. # noqa: E501 - - :return: The my_boolean of this OuterComposite. # noqa: E501 - :rtype: bool + Returns: + (bool): The my_boolean of this OuterComposite. # noqa: E501 """ - return self._my_boolean + return self.__get_item('my_boolean') @my_boolean.setter - def my_boolean(self, my_boolean): # noqa: E501 - """Sets the my_boolean of this OuterComposite. - - - :param my_boolean: The my_boolean of this OuterComposite. # noqa: E501 - :type: bool + def my_boolean(self, value): + """Sets the my_boolean of this OuterComposite. # noqa: E501 """ - - self._my_boolean = ( - my_boolean - ) + return self.__set_item('my_boolean', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -193,7 +249,22 @@ class OuterComposite(ModelNormal): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py index d9cdd3d0c60..e10dfc65118 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -42,65 +56,147 @@ class OuterEnum(ModelSimple): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('value',): { 'PLACED': "placed", 'APPROVED': "approved", - 'DELIVERED': "delivered" + 'DELIVERED': "delivered", }, } openapi_types = { - 'value': 'str' + 'value': (str,), # noqa: E501 } validations = { } - def __init__(self, value=None): # noqa: E501 - """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._value = None - self.discriminator = None + discriminator = None - self.value = value + def __init__(self, value, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """OuterEnum - a model defined in OpenAPI + + Args: + value (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('value', value) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def value(self): """Gets the value of this OuterEnum. # noqa: E501 - - :return: The value of this OuterEnum. # noqa: E501 - :rtype: str + Returns: + (str): The value of this OuterEnum. # noqa: E501 """ - return self._value + return self.__get_item('value') @value.setter - def value(self, value): # noqa: E501 - """Sets the value of this OuterEnum. - - - :param value: The value of this OuterEnum. # noqa: E501 - :type: str + def value(self, value): + """Sets the value of this OuterEnum. # noqa: E501 """ - if value is None: - raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('value',), - value, - self.validations - ) - - self._value = ( - value - ) + return self.__set_item('value', value) def to_str(self): """Returns the string representation of the model""" - return str(self._value) + return str(self.value) def __repr__(self): """For `print` and `pprint`""" @@ -111,7 +207,19 @@ class OuterEnum(ModelSimple): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not six.PY3 and len(types) == 2 and unicode in types: # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py index 36c2bd3da19..ca2be68a97e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -42,64 +56,146 @@ class OuterNumber(ModelSimple): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { } openapi_types = { - 'value': 'float' + 'value': (float,), # noqa: E501 } validations = { ('value',): { - 'inclusive_maximum': 2E+1, 'inclusive_minimum': 1E+1, }, } - def __init__(self, value=None): # noqa: E501 - """OuterNumber - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._value = None - self.discriminator = None + discriminator = None - self.value = value + def __init__(self, value, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """OuterNumber - a model defined in OpenAPI + + Args: + value (float): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('value', value) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def value(self): """Gets the value of this OuterNumber. # noqa: E501 - - :return: The value of this OuterNumber. # noqa: E501 - :rtype: float + Returns: + (float): The value of this OuterNumber. # noqa: E501 """ - return self._value + return self.__get_item('value') @value.setter - def value(self, value): # noqa: E501 - """Sets the value of this OuterNumber. - - - :param value: The value of this OuterNumber. # noqa: E501 - :type: float + def value(self, value): + """Sets the value of this OuterNumber. # noqa: E501 """ - if value is None: - raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - check_validations( - self.validations, - ('value',), - value - ) - - self._value = ( - value - ) + return self.__set_item('value', value) def to_str(self): """Returns the string representation of the model""" - return str(self._value) + return str(self.value) def __repr__(self): """For `print` and `pprint`""" @@ -110,7 +206,19 @@ class OuterNumber(ModelSimple): if not isinstance(other, OuterNumber): return False - return self.__dict__ == other.__dict__ + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not six.PY3 and len(types) == 2 and unicode in types: # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/client/petstore/python-experimental/petstore_api/models/pet.py index 07db6522931..3abfdfba760 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/pet.py @@ -15,13 +15,29 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) +from petstore_api.models.category import Category +from petstore_api.models.tag import Tag class Pet(ModelNormal): @@ -46,13 +62,15 @@ class Pet(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('status',): { 'AVAILABLE': "available", 'PENDING': "pending", - 'SOLD': "sold" + 'SOLD': "sold", }, } @@ -66,220 +84,222 @@ class Pet(ModelNormal): } openapi_types = { - 'id': 'int', - 'category': 'Category', - 'name': 'str', - 'photo_urls': 'list[str]', - 'tags': 'list[Tag]', - 'status': 'str' + 'id': (int,), # noqa: E501 + 'category': (Category,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'photo_urls': ([str],), # noqa: E501 + 'tags': ([Tag],), # noqa: E501 + 'status': (str,), # noqa: E501 } validations = { } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 - """Pet - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._id = None - self._category = None - self._name = None - self._photo_urls = None - self._tags = None - self._status = None - self.discriminator = None + discriminator = None - if id is not None: - self.id = ( - id + def __init__(self, name, photo_urls, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Pet - a model defined in OpenAPI + + Args: + name (str): + photo_urls ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + id (int): [optional] # noqa: E501 + category (Category): [optional] # noqa: E501 + tags ([Tag]): [optional] # noqa: E501 + status (str): pet status in the store. [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('name', name) + self.__set_item('photo_urls', photo_urls) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if category is not None: - self.category = ( - category + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - self.name = name - self.photo_urls = photo_urls - if tags is not None: - self.tags = ( - tags + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if status is not None: - self.status = ( - status + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def id(self): """Gets the id of this Pet. # noqa: E501 - - :return: The id of this Pet. # noqa: E501 - :rtype: int + Returns: + (int): The id of this Pet. # noqa: E501 """ - return self._id + return self.__get_item('id') @id.setter - def id(self, id): # noqa: E501 - """Sets the id of this Pet. - - - :param id: The id of this Pet. # noqa: E501 - :type: int + def id(self, value): + """Sets the id of this Pet. # noqa: E501 """ - - self._id = ( - id - ) + return self.__set_item('id', value) @property def category(self): """Gets the category of this Pet. # noqa: E501 - - :return: The category of this Pet. # noqa: E501 - :rtype: Category + Returns: + (Category): The category of this Pet. # noqa: E501 """ - return self._category + return self.__get_item('category') @category.setter - def category(self, category): # noqa: E501 - """Sets the category of this Pet. - - - :param category: The category of this Pet. # noqa: E501 - :type: Category + def category(self, value): + """Sets the category of this Pet. # noqa: E501 """ - - self._category = ( - category - ) + return self.__set_item('category', value) @property def name(self): """Gets the name of this Pet. # noqa: E501 - - :return: The name of this Pet. # noqa: E501 - :rtype: str + Returns: + (str): The name of this Pet. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this Pet. - - - :param name: The name of this Pet. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this Pet. # noqa: E501 """ - if name is None: - raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = ( - name - ) + return self.__set_item('name', value) @property def photo_urls(self): """Gets the photo_urls of this Pet. # noqa: E501 - - :return: The photo_urls of this Pet. # noqa: E501 - :rtype: list[str] + Returns: + ([str]): The photo_urls of this Pet. # noqa: E501 """ - return self._photo_urls + return self.__get_item('photo_urls') @photo_urls.setter - def photo_urls(self, photo_urls): # noqa: E501 - """Sets the photo_urls of this Pet. - - - :param photo_urls: The photo_urls of this Pet. # noqa: E501 - :type: list[str] + def photo_urls(self, value): + """Sets the photo_urls of this Pet. # noqa: E501 """ - if photo_urls is None: - raise ApiValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 - - self._photo_urls = ( - photo_urls - ) + return self.__set_item('photo_urls', value) @property def tags(self): """Gets the tags of this Pet. # noqa: E501 - - :return: The tags of this Pet. # noqa: E501 - :rtype: list[Tag] + Returns: + ([Tag]): The tags of this Pet. # noqa: E501 """ - return self._tags + return self.__get_item('tags') @tags.setter - def tags(self, tags): # noqa: E501 - """Sets the tags of this Pet. - - - :param tags: The tags of this Pet. # noqa: E501 - :type: list[Tag] + def tags(self, value): + """Sets the tags of this Pet. # noqa: E501 """ - - self._tags = ( - tags - ) + return self.__set_item('tags', value) @property def status(self): """Gets the status of this Pet. # noqa: E501 - pet status in the store # noqa: E501 - :return: The status of this Pet. # noqa: E501 - :rtype: str + Returns: + (str): The status of this Pet. # noqa: E501 """ - return self._status + return self.__get_item('status') @status.setter - def status(self, status): # noqa: E501 - """Sets the status of this Pet. - + def status(self, value): + """Sets the status of this Pet. # noqa: E501 pet status in the store # noqa: E501 - - :param status: The status of this Pet. # noqa: E501 - :type: str """ - check_allowed_values( - self.allowed_values, - ('status',), - status, - self.validations - ) - - self._status = ( - status - ) + return self.__set_item('status', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -294,7 +314,22 @@ class Pet(ModelNormal): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 96d93afbd2b..848fbccfa91 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class ReadOnlyFirst(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,98 +73,149 @@ class ReadOnlyFirst(ModelNormal): } openapi_types = { - 'bar': 'str', - 'baz': 'str' + 'bar': (str,), # noqa: E501 + 'baz': (str,), # noqa: E501 } validations = { } - def __init__(self, bar=None, baz=None): # noqa: E501 - """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._bar = None - self._baz = None - self.discriminator = None + discriminator = None - if bar is not None: - self.bar = ( - bar + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """ReadOnlyFirst - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + bar (str): [optional] # noqa: E501 + baz (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if baz is not None: - self.baz = ( - baz + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def bar(self): """Gets the bar of this ReadOnlyFirst. # noqa: E501 - - :return: The bar of this ReadOnlyFirst. # noqa: E501 - :rtype: str + Returns: + (str): The bar of this ReadOnlyFirst. # noqa: E501 """ - return self._bar + return self.__get_item('bar') @bar.setter - def bar(self, bar): # noqa: E501 - """Sets the bar of this ReadOnlyFirst. - - - :param bar: The bar of this ReadOnlyFirst. # noqa: E501 - :type: str + def bar(self, value): + """Sets the bar of this ReadOnlyFirst. # noqa: E501 """ - - self._bar = ( - bar - ) + return self.__set_item('bar', value) @property def baz(self): """Gets the baz of this ReadOnlyFirst. # noqa: E501 - - :return: The baz of this ReadOnlyFirst. # noqa: E501 - :rtype: str + Returns: + (str): The baz of this ReadOnlyFirst. # noqa: E501 """ - return self._baz + return self.__get_item('baz') @baz.setter - def baz(self, baz): # noqa: E501 - """Sets the baz of this ReadOnlyFirst. - - - :param baz: The baz of this ReadOnlyFirst. # noqa: E501 - :type: str + def baz(self, value): + """Sets the baz of this ReadOnlyFirst. # noqa: E501 """ - - self._baz = ( - baz - ) + return self.__set_item('baz', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -163,7 +230,22 @@ class ReadOnlyFirst(ModelNormal): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 83ab1e65054..83810bdb894 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class SpecialModelName(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -56,69 +72,132 @@ class SpecialModelName(ModelNormal): } openapi_types = { - 'special_property_name': 'int' + 'special_property_name': (int,), # noqa: E501 } validations = { } - def __init__(self, special_property_name=None): # noqa: E501 - """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._special_property_name = None - self.discriminator = None + discriminator = None - if special_property_name is not None: - self.special_property_name = ( - special_property_name + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """SpecialModelName - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + special_property_name (int): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def special_property_name(self): """Gets the special_property_name of this SpecialModelName. # noqa: E501 - - :return: The special_property_name of this SpecialModelName. # noqa: E501 - :rtype: int + Returns: + (int): The special_property_name of this SpecialModelName. # noqa: E501 """ - return self._special_property_name + return self.__get_item('special_property_name') @special_property_name.setter - def special_property_name(self, special_property_name): # noqa: E501 - """Sets the special_property_name of this SpecialModelName. - - - :param special_property_name: The special_property_name of this SpecialModelName. # noqa: E501 - :type: int + def special_property_name(self, value): + """Sets the special_property_name of this SpecialModelName. # noqa: E501 """ - - self._special_property_name = ( - special_property_name - ) + return self.__set_item('special_property_name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -133,7 +212,22 @@ class SpecialModelName(ModelNormal): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 01427c702be..1d10f9a8d7e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class StringBooleanMap(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -60,33 +76,110 @@ class StringBooleanMap(ModelNormal): validations = { } - def __init__(self): # noqa: E501 - """StringBooleanMap - a model defined in OpenAPI""" # noqa: E501 - self.discriminator = None + additional_properties_type = (bool,) # noqa: E501 + + discriminator = None + + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """StringBooleanMap - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -101,7 +194,22 @@ class StringBooleanMap(ModelNormal): if not isinstance(other, StringBooleanMap): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/client/petstore/python-experimental/petstore_api/models/tag.py index f5e08704a00..4e1fd5ef077 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/tag.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class Tag(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -57,98 +73,149 @@ class Tag(ModelNormal): } openapi_types = { - 'id': 'int', - 'name': 'str' + 'id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 } validations = { } - def __init__(self, id=None, name=None): # noqa: E501 - """Tag - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._id = None - self._name = None - self.discriminator = None + discriminator = None - if id is not None: - self.id = ( - id + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """Tag - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + id (int): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if name is not None: - self.name = ( - name + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def id(self): """Gets the id of this Tag. # noqa: E501 - - :return: The id of this Tag. # noqa: E501 - :rtype: int + Returns: + (int): The id of this Tag. # noqa: E501 """ - return self._id + return self.__get_item('id') @id.setter - def id(self, id): # noqa: E501 - """Sets the id of this Tag. - - - :param id: The id of this Tag. # noqa: E501 - :type: int + def id(self, value): + """Sets the id of this Tag. # noqa: E501 """ - - self._id = ( - id - ) + return self.__set_item('id', value) @property def name(self): """Gets the name of this Tag. # noqa: E501 - - :return: The name of this Tag. # noqa: E501 - :rtype: str + Returns: + (str): The name of this Tag. # noqa: E501 """ - return self._name + return self.__get_item('name') @name.setter - def name(self, name): # noqa: E501 - """Sets the name of this Tag. - - - :param name: The name of this Tag. # noqa: E501 - :type: str + def name(self, value): + """Sets the name of this Tag. # noqa: E501 """ - - self._name = ( - name - ) + return self.__set_item('name', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -163,7 +230,22 @@ class Tag(ModelNormal): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py index a27e05e14d2..26f1d904452 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class TypeHolderDefault(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -62,238 +78,240 @@ class TypeHolderDefault(ModelNormal): } openapi_types = { - 'string_item': 'str', - 'number_item': 'float', - 'integer_item': 'int', - 'bool_item': 'bool', - 'date_item': 'date', - 'datetime_item': 'datetime', - 'array_item': 'list[int]' + 'string_item': (str,), # noqa: E501 + 'number_item': (float,), # noqa: E501 + 'integer_item': (int,), # noqa: E501 + 'bool_item': (bool,), # noqa: E501 + 'date_item': (date,), # noqa: E501 + 'datetime_item': (datetime,), # noqa: E501 + 'array_item': ([int],), # noqa: E501 } validations = { } - def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, date_item=None, datetime_item=None, array_item=None): # noqa: E501 - """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._string_item = None - self._number_item = None - self._integer_item = None - self._bool_item = None - self._date_item = None - self._datetime_item = None - self._array_item = None - self.discriminator = None + discriminator = None - self.string_item = string_item - self.number_item = number_item - self.integer_item = integer_item - self.bool_item = bool_item - if date_item is not None: - self.date_item = ( - date_item + def __init__(self, array_item, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """TypeHolderDefault - a model defined in OpenAPI + + Args: + array_item ([int]): + + Keyword Args: + string_item (str): defaults to 'what', must be one of ['what'] # noqa: E501 + number_item (float): defaults to 1.234, must be one of [1.234] # noqa: E501 + integer_item (int): defaults to -2, must be one of [-2] # noqa: E501 + bool_item (bool): defaults to True, must be one of [True] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + date_item (date): [optional] # noqa: E501 + datetime_item (datetime): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('string_item', string_item) + self.__set_item('number_item', number_item) + self.__set_item('integer_item', integer_item) + self.__set_item('bool_item', bool_item) + self.__set_item('array_item', array_item) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if datetime_item is not None: - self.datetime_item = ( - datetime_item + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - self.array_item = array_item + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def string_item(self): """Gets the string_item of this TypeHolderDefault. # noqa: E501 - - :return: The string_item of this TypeHolderDefault. # noqa: E501 - :rtype: str + Returns: + (str): The string_item of this TypeHolderDefault. # noqa: E501 """ - return self._string_item + return self.__get_item('string_item') @string_item.setter - def string_item(self, string_item): # noqa: E501 - """Sets the string_item of this TypeHolderDefault. - - - :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 - :type: str + def string_item(self, value): + """Sets the string_item of this TypeHolderDefault. # noqa: E501 """ - if string_item is None: - raise ApiValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 - - self._string_item = ( - string_item - ) + return self.__set_item('string_item', value) @property def number_item(self): """Gets the number_item of this TypeHolderDefault. # noqa: E501 - - :return: The number_item of this TypeHolderDefault. # noqa: E501 - :rtype: float + Returns: + (float): The number_item of this TypeHolderDefault. # noqa: E501 """ - return self._number_item + return self.__get_item('number_item') @number_item.setter - def number_item(self, number_item): # noqa: E501 - """Sets the number_item of this TypeHolderDefault. - - - :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 - :type: float + def number_item(self, value): + """Sets the number_item of this TypeHolderDefault. # noqa: E501 """ - if number_item is None: - raise ApiValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 - - self._number_item = ( - number_item - ) + return self.__set_item('number_item', value) @property def integer_item(self): """Gets the integer_item of this TypeHolderDefault. # noqa: E501 - - :return: The integer_item of this TypeHolderDefault. # noqa: E501 - :rtype: int + Returns: + (int): The integer_item of this TypeHolderDefault. # noqa: E501 """ - return self._integer_item + return self.__get_item('integer_item') @integer_item.setter - def integer_item(self, integer_item): # noqa: E501 - """Sets the integer_item of this TypeHolderDefault. - - - :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 - :type: int + def integer_item(self, value): + """Sets the integer_item of this TypeHolderDefault. # noqa: E501 """ - if integer_item is None: - raise ApiValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 - - self._integer_item = ( - integer_item - ) + return self.__set_item('integer_item', value) @property def bool_item(self): """Gets the bool_item of this TypeHolderDefault. # noqa: E501 - - :return: The bool_item of this TypeHolderDefault. # noqa: E501 - :rtype: bool + Returns: + (bool): The bool_item of this TypeHolderDefault. # noqa: E501 """ - return self._bool_item + return self.__get_item('bool_item') @bool_item.setter - def bool_item(self, bool_item): # noqa: E501 - """Sets the bool_item of this TypeHolderDefault. - - - :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 - :type: bool + def bool_item(self, value): + """Sets the bool_item of this TypeHolderDefault. # noqa: E501 """ - if bool_item is None: - raise ApiValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 - - self._bool_item = ( - bool_item - ) + return self.__set_item('bool_item', value) @property def date_item(self): """Gets the date_item of this TypeHolderDefault. # noqa: E501 - - :return: The date_item of this TypeHolderDefault. # noqa: E501 - :rtype: date + Returns: + (date): The date_item of this TypeHolderDefault. # noqa: E501 """ - return self._date_item + return self.__get_item('date_item') @date_item.setter - def date_item(self, date_item): # noqa: E501 - """Sets the date_item of this TypeHolderDefault. - - - :param date_item: The date_item of this TypeHolderDefault. # noqa: E501 - :type: date + def date_item(self, value): + """Sets the date_item of this TypeHolderDefault. # noqa: E501 """ - - self._date_item = ( - date_item - ) + return self.__set_item('date_item', value) @property def datetime_item(self): """Gets the datetime_item of this TypeHolderDefault. # noqa: E501 - - :return: The datetime_item of this TypeHolderDefault. # noqa: E501 - :rtype: datetime + Returns: + (datetime): The datetime_item of this TypeHolderDefault. # noqa: E501 """ - return self._datetime_item + return self.__get_item('datetime_item') @datetime_item.setter - def datetime_item(self, datetime_item): # noqa: E501 - """Sets the datetime_item of this TypeHolderDefault. - - - :param datetime_item: The datetime_item of this TypeHolderDefault. # noqa: E501 - :type: datetime + def datetime_item(self, value): + """Sets the datetime_item of this TypeHolderDefault. # noqa: E501 """ - - self._datetime_item = ( - datetime_item - ) + return self.__set_item('datetime_item', value) @property def array_item(self): """Gets the array_item of this TypeHolderDefault. # noqa: E501 - - :return: The array_item of this TypeHolderDefault. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The array_item of this TypeHolderDefault. # noqa: E501 """ - return self._array_item + return self.__get_item('array_item') @array_item.setter - def array_item(self, array_item): # noqa: E501 - """Sets the array_item of this TypeHolderDefault. - - - :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 - :type: list[int] + def array_item(self, value): + """Sets the array_item of this TypeHolderDefault. # noqa: E501 """ - if array_item is None: - raise ApiValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 - - self._array_item = ( - array_item - ) + return self.__set_item('array_item', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -308,7 +326,22 @@ class TypeHolderDefault(ModelNormal): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py index 661bb21a380..b4fb4770d1e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,17 +60,19 @@ class TypeHolderExample(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { ('string_item',): { - 'WHAT': "what" + 'WHAT': "what", }, ('number_item',): { - '1.234': 1.234 + '1.234': 1.234, }, ('integer_item',): { - '-2': -2 + '-2': -2, }, } @@ -69,198 +85,206 @@ class TypeHolderExample(ModelNormal): } openapi_types = { - 'string_item': 'str', - 'number_item': 'float', - 'integer_item': 'int', - 'bool_item': 'bool', - 'array_item': 'list[int]' + 'string_item': (str,), # noqa: E501 + 'number_item': (float,), # noqa: E501 + 'integer_item': (int,), # noqa: E501 + 'bool_item': (bool,), # noqa: E501 + 'array_item': ([int],), # noqa: E501 } validations = { } - def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=None, array_item=None): # noqa: E501 - """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._string_item = None - self._number_item = None - self._integer_item = None - self._bool_item = None - self._array_item = None - self.discriminator = None + discriminator = None - self.string_item = string_item - self.number_item = number_item - self.integer_item = integer_item - self.bool_item = bool_item - self.array_item = array_item + def __init__(self, bool_item, array_item, string_item='what', number_item=1.234, integer_item=-2, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """TypeHolderExample - a model defined in OpenAPI + + Args: + bool_item (bool): + array_item ([int]): + + Keyword Args: + string_item (str): defaults to 'what', must be one of ['what'] # noqa: E501 + number_item (float): defaults to 1.234, must be one of [1.234] # noqa: E501 + integer_item (int): defaults to -2, must be one of [-2] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.__set_item('string_item', string_item) + self.__set_item('number_item', number_item) + self.__set_item('integer_item', integer_item) + self.__set_item('bool_item', bool_item) + self.__set_item('array_item', array_item) + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value + ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def string_item(self): """Gets the string_item of this TypeHolderExample. # noqa: E501 - - :return: The string_item of this TypeHolderExample. # noqa: E501 - :rtype: str + Returns: + (str): The string_item of this TypeHolderExample. # noqa: E501 """ - return self._string_item + return self.__get_item('string_item') @string_item.setter - def string_item(self, string_item): # noqa: E501 - """Sets the string_item of this TypeHolderExample. - - - :param string_item: The string_item of this TypeHolderExample. # noqa: E501 - :type: str + def string_item(self, value): + """Sets the string_item of this TypeHolderExample. # noqa: E501 """ - if string_item is None: - raise ApiValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('string_item',), - string_item, - self.validations - ) - - self._string_item = ( - string_item - ) + return self.__set_item('string_item', value) @property def number_item(self): """Gets the number_item of this TypeHolderExample. # noqa: E501 - - :return: The number_item of this TypeHolderExample. # noqa: E501 - :rtype: float + Returns: + (float): The number_item of this TypeHolderExample. # noqa: E501 """ - return self._number_item + return self.__get_item('number_item') @number_item.setter - def number_item(self, number_item): # noqa: E501 - """Sets the number_item of this TypeHolderExample. - - - :param number_item: The number_item of this TypeHolderExample. # noqa: E501 - :type: float + def number_item(self, value): + """Sets the number_item of this TypeHolderExample. # noqa: E501 """ - if number_item is None: - raise ApiValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('number_item',), - number_item, - self.validations - ) - - self._number_item = ( - number_item - ) + return self.__set_item('number_item', value) @property def integer_item(self): """Gets the integer_item of this TypeHolderExample. # noqa: E501 - - :return: The integer_item of this TypeHolderExample. # noqa: E501 - :rtype: int + Returns: + (int): The integer_item of this TypeHolderExample. # noqa: E501 """ - return self._integer_item + return self.__get_item('integer_item') @integer_item.setter - def integer_item(self, integer_item): # noqa: E501 - """Sets the integer_item of this TypeHolderExample. - - - :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 - :type: int + def integer_item(self, value): + """Sets the integer_item of this TypeHolderExample. # noqa: E501 """ - if integer_item is None: - raise ApiValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 - check_allowed_values( - self.allowed_values, - ('integer_item',), - integer_item, - self.validations - ) - - self._integer_item = ( - integer_item - ) + return self.__set_item('integer_item', value) @property def bool_item(self): """Gets the bool_item of this TypeHolderExample. # noqa: E501 - - :return: The bool_item of this TypeHolderExample. # noqa: E501 - :rtype: bool + Returns: + (bool): The bool_item of this TypeHolderExample. # noqa: E501 """ - return self._bool_item + return self.__get_item('bool_item') @bool_item.setter - def bool_item(self, bool_item): # noqa: E501 - """Sets the bool_item of this TypeHolderExample. - - - :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 - :type: bool + def bool_item(self, value): + """Sets the bool_item of this TypeHolderExample. # noqa: E501 """ - if bool_item is None: - raise ApiValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 - - self._bool_item = ( - bool_item - ) + return self.__set_item('bool_item', value) @property def array_item(self): """Gets the array_item of this TypeHolderExample. # noqa: E501 - - :return: The array_item of this TypeHolderExample. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The array_item of this TypeHolderExample. # noqa: E501 """ - return self._array_item + return self.__get_item('array_item') @array_item.setter - def array_item(self, array_item): # noqa: E501 - """Sets the array_item of this TypeHolderExample. - - - :param array_item: The array_item of this TypeHolderExample. # noqa: E501 - :type: list[int] + def array_item(self, value): + """Sets the array_item of this TypeHolderExample. # noqa: E501 """ - if array_item is None: - raise ApiValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 - - self._array_item = ( - array_item - ) + return self.__set_item('array_item', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -275,7 +299,22 @@ class TypeHolderExample(ModelNormal): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/user.py b/samples/client/petstore/python-experimental/petstore_api/models/user.py index 1dcf8d75532..6d4d4539a84 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/user.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class User(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -63,274 +79,253 @@ class User(ModelNormal): } openapi_types = { - 'id': 'int', - 'username': 'str', - 'first_name': 'str', - 'last_name': 'str', - 'email': 'str', - 'password': 'str', - 'phone': 'str', - 'user_status': 'int' + 'id': (int,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'first_name': (str,), # noqa: E501 + 'last_name': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'phone': (str,), # noqa: E501 + 'user_status': (int,), # noqa: E501 } validations = { } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 - """User - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._id = None - self._username = None - self._first_name = None - self._last_name = None - self._email = None - self._password = None - self._phone = None - self._user_status = None - self.discriminator = None + discriminator = None - if id is not None: - self.id = ( - id + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """User - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + id (int): [optional] # noqa: E501 + username (str): [optional] # noqa: E501 + first_name (str): [optional] # noqa: E501 + last_name (str): [optional] # noqa: E501 + email (str): [optional] # noqa: E501 + password (str): [optional] # noqa: E501 + phone (str): [optional] # noqa: E501 + user_status (int): User Status. [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if username is not None: - self.username = ( - username + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if first_name is not None: - self.first_name = ( - first_name + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if last_name is not None: - self.last_name = ( - last_name + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if email is not None: - self.email = ( - email - ) - if password is not None: - self.password = ( - password - ) - if phone is not None: - self.phone = ( - phone - ) - if user_status is not None: - self.user_status = ( - user_status + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def id(self): """Gets the id of this User. # noqa: E501 - - :return: The id of this User. # noqa: E501 - :rtype: int + Returns: + (int): The id of this User. # noqa: E501 """ - return self._id + return self.__get_item('id') @id.setter - def id(self, id): # noqa: E501 - """Sets the id of this User. - - - :param id: The id of this User. # noqa: E501 - :type: int + def id(self, value): + """Sets the id of this User. # noqa: E501 """ - - self._id = ( - id - ) + return self.__set_item('id', value) @property def username(self): """Gets the username of this User. # noqa: E501 - - :return: The username of this User. # noqa: E501 - :rtype: str + Returns: + (str): The username of this User. # noqa: E501 """ - return self._username + return self.__get_item('username') @username.setter - def username(self, username): # noqa: E501 - """Sets the username of this User. - - - :param username: The username of this User. # noqa: E501 - :type: str + def username(self, value): + """Sets the username of this User. # noqa: E501 """ - - self._username = ( - username - ) + return self.__set_item('username', value) @property def first_name(self): """Gets the first_name of this User. # noqa: E501 - - :return: The first_name of this User. # noqa: E501 - :rtype: str + Returns: + (str): The first_name of this User. # noqa: E501 """ - return self._first_name + return self.__get_item('first_name') @first_name.setter - def first_name(self, first_name): # noqa: E501 - """Sets the first_name of this User. - - - :param first_name: The first_name of this User. # noqa: E501 - :type: str + def first_name(self, value): + """Sets the first_name of this User. # noqa: E501 """ - - self._first_name = ( - first_name - ) + return self.__set_item('first_name', value) @property def last_name(self): """Gets the last_name of this User. # noqa: E501 - - :return: The last_name of this User. # noqa: E501 - :rtype: str + Returns: + (str): The last_name of this User. # noqa: E501 """ - return self._last_name + return self.__get_item('last_name') @last_name.setter - def last_name(self, last_name): # noqa: E501 - """Sets the last_name of this User. - - - :param last_name: The last_name of this User. # noqa: E501 - :type: str + def last_name(self, value): + """Sets the last_name of this User. # noqa: E501 """ - - self._last_name = ( - last_name - ) + return self.__set_item('last_name', value) @property def email(self): """Gets the email of this User. # noqa: E501 - - :return: The email of this User. # noqa: E501 - :rtype: str + Returns: + (str): The email of this User. # noqa: E501 """ - return self._email + return self.__get_item('email') @email.setter - def email(self, email): # noqa: E501 - """Sets the email of this User. - - - :param email: The email of this User. # noqa: E501 - :type: str + def email(self, value): + """Sets the email of this User. # noqa: E501 """ - - self._email = ( - email - ) + return self.__set_item('email', value) @property def password(self): """Gets the password of this User. # noqa: E501 - - :return: The password of this User. # noqa: E501 - :rtype: str + Returns: + (str): The password of this User. # noqa: E501 """ - return self._password + return self.__get_item('password') @password.setter - def password(self, password): # noqa: E501 - """Sets the password of this User. - - - :param password: The password of this User. # noqa: E501 - :type: str + def password(self, value): + """Sets the password of this User. # noqa: E501 """ - - self._password = ( - password - ) + return self.__set_item('password', value) @property def phone(self): """Gets the phone of this User. # noqa: E501 - - :return: The phone of this User. # noqa: E501 - :rtype: str + Returns: + (str): The phone of this User. # noqa: E501 """ - return self._phone + return self.__get_item('phone') @phone.setter - def phone(self, phone): # noqa: E501 - """Sets the phone of this User. - - - :param phone: The phone of this User. # noqa: E501 - :type: str + def phone(self, value): + """Sets the phone of this User. # noqa: E501 """ - - self._phone = ( - phone - ) + return self.__set_item('phone', value) @property def user_status(self): """Gets the user_status of this User. # noqa: E501 - User Status # noqa: E501 - :return: The user_status of this User. # noqa: E501 - :rtype: int + Returns: + (int): The user_status of this User. # noqa: E501 """ - return self._user_status + return self.__get_item('user_status') @user_status.setter - def user_status(self, user_status): # noqa: E501 - """Sets the user_status of this User. - + def user_status(self, value): + """Sets the user_status of this User. # noqa: E501 User Status # noqa: E501 - - :param user_status: The user_status of this User. # noqa: E501 - :type: int """ - - self._user_status = ( - user_status - ) + return self.__set_item('user_status', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -345,7 +340,22 @@ class User(ModelNormal): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py index 3657b04b1e6..f7ded778c29 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py @@ -15,12 +15,26 @@ import re # noqa: F401 import six # noqa: F401 -from petstore_api.exceptions import ApiValueError # noqa: F401 +from petstore_api.exceptions import ( # noqa: F401 + ApiKeyError, + ApiTypeError, + ApiValueError, +) from petstore_api.model_utils import ( # noqa: F401 ModelNormal, ModelSimple, check_allowed_values, - check_validations + check_validations, + date, + datetime, + file_type, + get_simple_class, + int, + model_to_dict, + none_type, + str, + type_error_message, + validate_and_convert_types ) @@ -46,6 +60,8 @@ class XmlItem(ModelNormal): that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ allowed_values = { @@ -84,881 +100,608 @@ class XmlItem(ModelNormal): } openapi_types = { - 'attribute_string': 'str', - 'attribute_number': 'float', - 'attribute_integer': 'int', - 'attribute_boolean': 'bool', - 'wrapped_array': 'list[int]', - 'name_string': 'str', - 'name_number': 'float', - 'name_integer': 'int', - 'name_boolean': 'bool', - 'name_array': 'list[int]', - 'name_wrapped_array': 'list[int]', - 'prefix_string': 'str', - 'prefix_number': 'float', - 'prefix_integer': 'int', - 'prefix_boolean': 'bool', - 'prefix_array': 'list[int]', - 'prefix_wrapped_array': 'list[int]', - 'namespace_string': 'str', - 'namespace_number': 'float', - 'namespace_integer': 'int', - 'namespace_boolean': 'bool', - 'namespace_array': 'list[int]', - 'namespace_wrapped_array': 'list[int]', - 'prefix_ns_string': 'str', - 'prefix_ns_number': 'float', - 'prefix_ns_integer': 'int', - 'prefix_ns_boolean': 'bool', - 'prefix_ns_array': 'list[int]', - 'prefix_ns_wrapped_array': 'list[int]' + 'attribute_string': (str,), # noqa: E501 + 'attribute_number': (float,), # noqa: E501 + 'attribute_integer': (int,), # noqa: E501 + 'attribute_boolean': (bool,), # noqa: E501 + 'wrapped_array': ([int],), # noqa: E501 + 'name_string': (str,), # noqa: E501 + 'name_number': (float,), # noqa: E501 + 'name_integer': (int,), # noqa: E501 + 'name_boolean': (bool,), # noqa: E501 + 'name_array': ([int],), # noqa: E501 + 'name_wrapped_array': ([int],), # noqa: E501 + 'prefix_string': (str,), # noqa: E501 + 'prefix_number': (float,), # noqa: E501 + 'prefix_integer': (int,), # noqa: E501 + 'prefix_boolean': (bool,), # noqa: E501 + 'prefix_array': ([int],), # noqa: E501 + 'prefix_wrapped_array': ([int],), # noqa: E501 + 'namespace_string': (str,), # noqa: E501 + 'namespace_number': (float,), # noqa: E501 + 'namespace_integer': (int,), # noqa: E501 + 'namespace_boolean': (bool,), # noqa: E501 + 'namespace_array': ([int],), # noqa: E501 + 'namespace_wrapped_array': ([int],), # noqa: E501 + 'prefix_ns_string': (str,), # noqa: E501 + 'prefix_ns_number': (float,), # noqa: E501 + 'prefix_ns_integer': (int,), # noqa: E501 + 'prefix_ns_boolean': (bool,), # noqa: E501 + 'prefix_ns_array': ([int],), # noqa: E501 + 'prefix_ns_wrapped_array': ([int],), # noqa: E501 } validations = { } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 - """XmlItem - a model defined in OpenAPI""" # noqa: E501 + additional_properties_type = None - self._attribute_string = None - self._attribute_number = None - self._attribute_integer = None - self._attribute_boolean = None - self._wrapped_array = None - self._name_string = None - self._name_number = None - self._name_integer = None - self._name_boolean = None - self._name_array = None - self._name_wrapped_array = None - self._prefix_string = None - self._prefix_number = None - self._prefix_integer = None - self._prefix_boolean = None - self._prefix_array = None - self._prefix_wrapped_array = None - self._namespace_string = None - self._namespace_number = None - self._namespace_integer = None - self._namespace_boolean = None - self._namespace_array = None - self._namespace_wrapped_array = None - self._prefix_ns_string = None - self._prefix_ns_number = None - self._prefix_ns_integer = None - self._prefix_ns_boolean = None - self._prefix_ns_array = None - self._prefix_ns_wrapped_array = None - self.discriminator = None + discriminator = None - if attribute_string is not None: - self.attribute_string = ( - attribute_string + def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """XmlItem - a model defined in OpenAPI + + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + attribute_string (str): [optional] # noqa: E501 + attribute_number (float): [optional] # noqa: E501 + attribute_integer (int): [optional] # noqa: E501 + attribute_boolean (bool): [optional] # noqa: E501 + wrapped_array ([int]): [optional] # noqa: E501 + name_string (str): [optional] # noqa: E501 + name_number (float): [optional] # noqa: E501 + name_integer (int): [optional] # noqa: E501 + name_boolean (bool): [optional] # noqa: E501 + name_array ([int]): [optional] # noqa: E501 + name_wrapped_array ([int]): [optional] # noqa: E501 + prefix_string (str): [optional] # noqa: E501 + prefix_number (float): [optional] # noqa: E501 + prefix_integer (int): [optional] # noqa: E501 + prefix_boolean (bool): [optional] # noqa: E501 + prefix_array ([int]): [optional] # noqa: E501 + prefix_wrapped_array ([int]): [optional] # noqa: E501 + namespace_string (str): [optional] # noqa: E501 + namespace_number (float): [optional] # noqa: E501 + namespace_integer (int): [optional] # noqa: E501 + namespace_boolean (bool): [optional] # noqa: E501 + namespace_array ([int]): [optional] # noqa: E501 + namespace_wrapped_array ([int]): [optional] # noqa: E501 + prefix_ns_string (str): [optional] # noqa: E501 + prefix_ns_number (float): [optional] # noqa: E501 + prefix_ns_integer (int): [optional] # noqa: E501 + prefix_ns_boolean (bool): [optional] # noqa: E501 + prefix_ns_array ([int]): [optional] # noqa: E501 + prefix_ns_wrapped_array ([int]): [optional] # noqa: E501 + """ + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + for var_name, var_value in six.iteritems(kwargs): + self.__set_item(var_name, var_value) + + def __set_item(self, name, value): + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + path_to_item ) - if attribute_number is not None: - self.attribute_number = ( - attribute_number + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True ) - if attribute_integer is not None: - self.attribute_integer = ( - attribute_integer + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True ) - if attribute_boolean is not None: - self.attribute_boolean = ( - attribute_boolean + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._from_server, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value ) - if wrapped_array is not None: - self.wrapped_array = ( - wrapped_array - ) - if name_string is not None: - self.name_string = ( - name_string - ) - if name_number is not None: - self.name_number = ( - name_number - ) - if name_integer is not None: - self.name_integer = ( - name_integer - ) - if name_boolean is not None: - self.name_boolean = ( - name_boolean - ) - if name_array is not None: - self.name_array = ( - name_array - ) - if name_wrapped_array is not None: - self.name_wrapped_array = ( - name_wrapped_array - ) - if prefix_string is not None: - self.prefix_string = ( - prefix_string - ) - if prefix_number is not None: - self.prefix_number = ( - prefix_number - ) - if prefix_integer is not None: - self.prefix_integer = ( - prefix_integer - ) - if prefix_boolean is not None: - self.prefix_boolean = ( - prefix_boolean - ) - if prefix_array is not None: - self.prefix_array = ( - prefix_array - ) - if prefix_wrapped_array is not None: - self.prefix_wrapped_array = ( - prefix_wrapped_array - ) - if namespace_string is not None: - self.namespace_string = ( - namespace_string - ) - if namespace_number is not None: - self.namespace_number = ( - namespace_number - ) - if namespace_integer is not None: - self.namespace_integer = ( - namespace_integer - ) - if namespace_boolean is not None: - self.namespace_boolean = ( - namespace_boolean - ) - if namespace_array is not None: - self.namespace_array = ( - namespace_array - ) - if namespace_wrapped_array is not None: - self.namespace_wrapped_array = ( - namespace_wrapped_array - ) - if prefix_ns_string is not None: - self.prefix_ns_string = ( - prefix_ns_string - ) - if prefix_ns_number is not None: - self.prefix_ns_number = ( - prefix_ns_number - ) - if prefix_ns_integer is not None: - self.prefix_ns_integer = ( - prefix_ns_integer - ) - if prefix_ns_boolean is not None: - self.prefix_ns_boolean = ( - prefix_ns_boolean - ) - if prefix_ns_array is not None: - self.prefix_ns_array = ( - prefix_ns_array - ) - if prefix_ns_wrapped_array is not None: - self.prefix_ns_wrapped_array = ( - prefix_ns_wrapped_array + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value ) + self._data_store[name] = value + + def __get_item(self, name): + if name in self._data_store: + return self._data_store[name] + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + raise ApiKeyError( + "{0} has no key '{1}'".format(type(self).__name__, name), + [name] + ) + + def __setitem__(self, name, value): + """this allows us to set values with instance[field_name] = val""" + self.__set_item(name, value) + + def __getitem__(self, name): + """this allows us to get a value with val = instance[field_name]""" + return self.__get_item(name) @property def attribute_string(self): """Gets the attribute_string of this XmlItem. # noqa: E501 - - :return: The attribute_string of this XmlItem. # noqa: E501 - :rtype: str + Returns: + (str): The attribute_string of this XmlItem. # noqa: E501 """ - return self._attribute_string + return self.__get_item('attribute_string') @attribute_string.setter - def attribute_string(self, attribute_string): # noqa: E501 - """Sets the attribute_string of this XmlItem. - - - :param attribute_string: The attribute_string of this XmlItem. # noqa: E501 - :type: str + def attribute_string(self, value): + """Sets the attribute_string of this XmlItem. # noqa: E501 """ - - self._attribute_string = ( - attribute_string - ) + return self.__set_item('attribute_string', value) @property def attribute_number(self): """Gets the attribute_number of this XmlItem. # noqa: E501 - - :return: The attribute_number of this XmlItem. # noqa: E501 - :rtype: float + Returns: + (float): The attribute_number of this XmlItem. # noqa: E501 """ - return self._attribute_number + return self.__get_item('attribute_number') @attribute_number.setter - def attribute_number(self, attribute_number): # noqa: E501 - """Sets the attribute_number of this XmlItem. - - - :param attribute_number: The attribute_number of this XmlItem. # noqa: E501 - :type: float + def attribute_number(self, value): + """Sets the attribute_number of this XmlItem. # noqa: E501 """ - - self._attribute_number = ( - attribute_number - ) + return self.__set_item('attribute_number', value) @property def attribute_integer(self): """Gets the attribute_integer of this XmlItem. # noqa: E501 - - :return: The attribute_integer of this XmlItem. # noqa: E501 - :rtype: int + Returns: + (int): The attribute_integer of this XmlItem. # noqa: E501 """ - return self._attribute_integer + return self.__get_item('attribute_integer') @attribute_integer.setter - def attribute_integer(self, attribute_integer): # noqa: E501 - """Sets the attribute_integer of this XmlItem. - - - :param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501 - :type: int + def attribute_integer(self, value): + """Sets the attribute_integer of this XmlItem. # noqa: E501 """ - - self._attribute_integer = ( - attribute_integer - ) + return self.__set_item('attribute_integer', value) @property def attribute_boolean(self): """Gets the attribute_boolean of this XmlItem. # noqa: E501 - - :return: The attribute_boolean of this XmlItem. # noqa: E501 - :rtype: bool + Returns: + (bool): The attribute_boolean of this XmlItem. # noqa: E501 """ - return self._attribute_boolean + return self.__get_item('attribute_boolean') @attribute_boolean.setter - def attribute_boolean(self, attribute_boolean): # noqa: E501 - """Sets the attribute_boolean of this XmlItem. - - - :param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501 - :type: bool + def attribute_boolean(self, value): + """Sets the attribute_boolean of this XmlItem. # noqa: E501 """ - - self._attribute_boolean = ( - attribute_boolean - ) + return self.__set_item('attribute_boolean', value) @property def wrapped_array(self): """Gets the wrapped_array of this XmlItem. # noqa: E501 - - :return: The wrapped_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The wrapped_array of this XmlItem. # noqa: E501 """ - return self._wrapped_array + return self.__get_item('wrapped_array') @wrapped_array.setter - def wrapped_array(self, wrapped_array): # noqa: E501 - """Sets the wrapped_array of this XmlItem. - - - :param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501 - :type: list[int] + def wrapped_array(self, value): + """Sets the wrapped_array of this XmlItem. # noqa: E501 """ - - self._wrapped_array = ( - wrapped_array - ) + return self.__set_item('wrapped_array', value) @property def name_string(self): """Gets the name_string of this XmlItem. # noqa: E501 - - :return: The name_string of this XmlItem. # noqa: E501 - :rtype: str + Returns: + (str): The name_string of this XmlItem. # noqa: E501 """ - return self._name_string + return self.__get_item('name_string') @name_string.setter - def name_string(self, name_string): # noqa: E501 - """Sets the name_string of this XmlItem. - - - :param name_string: The name_string of this XmlItem. # noqa: E501 - :type: str + def name_string(self, value): + """Sets the name_string of this XmlItem. # noqa: E501 """ - - self._name_string = ( - name_string - ) + return self.__set_item('name_string', value) @property def name_number(self): """Gets the name_number of this XmlItem. # noqa: E501 - - :return: The name_number of this XmlItem. # noqa: E501 - :rtype: float + Returns: + (float): The name_number of this XmlItem. # noqa: E501 """ - return self._name_number + return self.__get_item('name_number') @name_number.setter - def name_number(self, name_number): # noqa: E501 - """Sets the name_number of this XmlItem. - - - :param name_number: The name_number of this XmlItem. # noqa: E501 - :type: float + def name_number(self, value): + """Sets the name_number of this XmlItem. # noqa: E501 """ - - self._name_number = ( - name_number - ) + return self.__set_item('name_number', value) @property def name_integer(self): """Gets the name_integer of this XmlItem. # noqa: E501 - - :return: The name_integer of this XmlItem. # noqa: E501 - :rtype: int + Returns: + (int): The name_integer of this XmlItem. # noqa: E501 """ - return self._name_integer + return self.__get_item('name_integer') @name_integer.setter - def name_integer(self, name_integer): # noqa: E501 - """Sets the name_integer of this XmlItem. - - - :param name_integer: The name_integer of this XmlItem. # noqa: E501 - :type: int + def name_integer(self, value): + """Sets the name_integer of this XmlItem. # noqa: E501 """ - - self._name_integer = ( - name_integer - ) + return self.__set_item('name_integer', value) @property def name_boolean(self): """Gets the name_boolean of this XmlItem. # noqa: E501 - - :return: The name_boolean of this XmlItem. # noqa: E501 - :rtype: bool + Returns: + (bool): The name_boolean of this XmlItem. # noqa: E501 """ - return self._name_boolean + return self.__get_item('name_boolean') @name_boolean.setter - def name_boolean(self, name_boolean): # noqa: E501 - """Sets the name_boolean of this XmlItem. - - - :param name_boolean: The name_boolean of this XmlItem. # noqa: E501 - :type: bool + def name_boolean(self, value): + """Sets the name_boolean of this XmlItem. # noqa: E501 """ - - self._name_boolean = ( - name_boolean - ) + return self.__set_item('name_boolean', value) @property def name_array(self): """Gets the name_array of this XmlItem. # noqa: E501 - - :return: The name_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The name_array of this XmlItem. # noqa: E501 """ - return self._name_array + return self.__get_item('name_array') @name_array.setter - def name_array(self, name_array): # noqa: E501 - """Sets the name_array of this XmlItem. - - - :param name_array: The name_array of this XmlItem. # noqa: E501 - :type: list[int] + def name_array(self, value): + """Sets the name_array of this XmlItem. # noqa: E501 """ - - self._name_array = ( - name_array - ) + return self.__set_item('name_array', value) @property def name_wrapped_array(self): """Gets the name_wrapped_array of this XmlItem. # noqa: E501 - - :return: The name_wrapped_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The name_wrapped_array of this XmlItem. # noqa: E501 """ - return self._name_wrapped_array + return self.__get_item('name_wrapped_array') @name_wrapped_array.setter - def name_wrapped_array(self, name_wrapped_array): # noqa: E501 - """Sets the name_wrapped_array of this XmlItem. - - - :param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501 - :type: list[int] + def name_wrapped_array(self, value): + """Sets the name_wrapped_array of this XmlItem. # noqa: E501 """ - - self._name_wrapped_array = ( - name_wrapped_array - ) + return self.__set_item('name_wrapped_array', value) @property def prefix_string(self): """Gets the prefix_string of this XmlItem. # noqa: E501 - - :return: The prefix_string of this XmlItem. # noqa: E501 - :rtype: str + Returns: + (str): The prefix_string of this XmlItem. # noqa: E501 """ - return self._prefix_string + return self.__get_item('prefix_string') @prefix_string.setter - def prefix_string(self, prefix_string): # noqa: E501 - """Sets the prefix_string of this XmlItem. - - - :param prefix_string: The prefix_string of this XmlItem. # noqa: E501 - :type: str + def prefix_string(self, value): + """Sets the prefix_string of this XmlItem. # noqa: E501 """ - - self._prefix_string = ( - prefix_string - ) + return self.__set_item('prefix_string', value) @property def prefix_number(self): """Gets the prefix_number of this XmlItem. # noqa: E501 - - :return: The prefix_number of this XmlItem. # noqa: E501 - :rtype: float + Returns: + (float): The prefix_number of this XmlItem. # noqa: E501 """ - return self._prefix_number + return self.__get_item('prefix_number') @prefix_number.setter - def prefix_number(self, prefix_number): # noqa: E501 - """Sets the prefix_number of this XmlItem. - - - :param prefix_number: The prefix_number of this XmlItem. # noqa: E501 - :type: float + def prefix_number(self, value): + """Sets the prefix_number of this XmlItem. # noqa: E501 """ - - self._prefix_number = ( - prefix_number - ) + return self.__set_item('prefix_number', value) @property def prefix_integer(self): """Gets the prefix_integer of this XmlItem. # noqa: E501 - - :return: The prefix_integer of this XmlItem. # noqa: E501 - :rtype: int + Returns: + (int): The prefix_integer of this XmlItem. # noqa: E501 """ - return self._prefix_integer + return self.__get_item('prefix_integer') @prefix_integer.setter - def prefix_integer(self, prefix_integer): # noqa: E501 - """Sets the prefix_integer of this XmlItem. - - - :param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501 - :type: int + def prefix_integer(self, value): + """Sets the prefix_integer of this XmlItem. # noqa: E501 """ - - self._prefix_integer = ( - prefix_integer - ) + return self.__set_item('prefix_integer', value) @property def prefix_boolean(self): """Gets the prefix_boolean of this XmlItem. # noqa: E501 - - :return: The prefix_boolean of this XmlItem. # noqa: E501 - :rtype: bool + Returns: + (bool): The prefix_boolean of this XmlItem. # noqa: E501 """ - return self._prefix_boolean + return self.__get_item('prefix_boolean') @prefix_boolean.setter - def prefix_boolean(self, prefix_boolean): # noqa: E501 - """Sets the prefix_boolean of this XmlItem. - - - :param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501 - :type: bool + def prefix_boolean(self, value): + """Sets the prefix_boolean of this XmlItem. # noqa: E501 """ - - self._prefix_boolean = ( - prefix_boolean - ) + return self.__set_item('prefix_boolean', value) @property def prefix_array(self): """Gets the prefix_array of this XmlItem. # noqa: E501 - - :return: The prefix_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The prefix_array of this XmlItem. # noqa: E501 """ - return self._prefix_array + return self.__get_item('prefix_array') @prefix_array.setter - def prefix_array(self, prefix_array): # noqa: E501 - """Sets the prefix_array of this XmlItem. - - - :param prefix_array: The prefix_array of this XmlItem. # noqa: E501 - :type: list[int] + def prefix_array(self, value): + """Sets the prefix_array of this XmlItem. # noqa: E501 """ - - self._prefix_array = ( - prefix_array - ) + return self.__set_item('prefix_array', value) @property def prefix_wrapped_array(self): """Gets the prefix_wrapped_array of this XmlItem. # noqa: E501 - - :return: The prefix_wrapped_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The prefix_wrapped_array of this XmlItem. # noqa: E501 """ - return self._prefix_wrapped_array + return self.__get_item('prefix_wrapped_array') @prefix_wrapped_array.setter - def prefix_wrapped_array(self, prefix_wrapped_array): # noqa: E501 - """Sets the prefix_wrapped_array of this XmlItem. - - - :param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501 - :type: list[int] + def prefix_wrapped_array(self, value): + """Sets the prefix_wrapped_array of this XmlItem. # noqa: E501 """ - - self._prefix_wrapped_array = ( - prefix_wrapped_array - ) + return self.__set_item('prefix_wrapped_array', value) @property def namespace_string(self): """Gets the namespace_string of this XmlItem. # noqa: E501 - - :return: The namespace_string of this XmlItem. # noqa: E501 - :rtype: str + Returns: + (str): The namespace_string of this XmlItem. # noqa: E501 """ - return self._namespace_string + return self.__get_item('namespace_string') @namespace_string.setter - def namespace_string(self, namespace_string): # noqa: E501 - """Sets the namespace_string of this XmlItem. - - - :param namespace_string: The namespace_string of this XmlItem. # noqa: E501 - :type: str + def namespace_string(self, value): + """Sets the namespace_string of this XmlItem. # noqa: E501 """ - - self._namespace_string = ( - namespace_string - ) + return self.__set_item('namespace_string', value) @property def namespace_number(self): """Gets the namespace_number of this XmlItem. # noqa: E501 - - :return: The namespace_number of this XmlItem. # noqa: E501 - :rtype: float + Returns: + (float): The namespace_number of this XmlItem. # noqa: E501 """ - return self._namespace_number + return self.__get_item('namespace_number') @namespace_number.setter - def namespace_number(self, namespace_number): # noqa: E501 - """Sets the namespace_number of this XmlItem. - - - :param namespace_number: The namespace_number of this XmlItem. # noqa: E501 - :type: float + def namespace_number(self, value): + """Sets the namespace_number of this XmlItem. # noqa: E501 """ - - self._namespace_number = ( - namespace_number - ) + return self.__set_item('namespace_number', value) @property def namespace_integer(self): """Gets the namespace_integer of this XmlItem. # noqa: E501 - - :return: The namespace_integer of this XmlItem. # noqa: E501 - :rtype: int + Returns: + (int): The namespace_integer of this XmlItem. # noqa: E501 """ - return self._namespace_integer + return self.__get_item('namespace_integer') @namespace_integer.setter - def namespace_integer(self, namespace_integer): # noqa: E501 - """Sets the namespace_integer of this XmlItem. - - - :param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501 - :type: int + def namespace_integer(self, value): + """Sets the namespace_integer of this XmlItem. # noqa: E501 """ - - self._namespace_integer = ( - namespace_integer - ) + return self.__set_item('namespace_integer', value) @property def namespace_boolean(self): """Gets the namespace_boolean of this XmlItem. # noqa: E501 - - :return: The namespace_boolean of this XmlItem. # noqa: E501 - :rtype: bool + Returns: + (bool): The namespace_boolean of this XmlItem. # noqa: E501 """ - return self._namespace_boolean + return self.__get_item('namespace_boolean') @namespace_boolean.setter - def namespace_boolean(self, namespace_boolean): # noqa: E501 - """Sets the namespace_boolean of this XmlItem. - - - :param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501 - :type: bool + def namespace_boolean(self, value): + """Sets the namespace_boolean of this XmlItem. # noqa: E501 """ - - self._namespace_boolean = ( - namespace_boolean - ) + return self.__set_item('namespace_boolean', value) @property def namespace_array(self): """Gets the namespace_array of this XmlItem. # noqa: E501 - - :return: The namespace_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The namespace_array of this XmlItem. # noqa: E501 """ - return self._namespace_array + return self.__get_item('namespace_array') @namespace_array.setter - def namespace_array(self, namespace_array): # noqa: E501 - """Sets the namespace_array of this XmlItem. - - - :param namespace_array: The namespace_array of this XmlItem. # noqa: E501 - :type: list[int] + def namespace_array(self, value): + """Sets the namespace_array of this XmlItem. # noqa: E501 """ - - self._namespace_array = ( - namespace_array - ) + return self.__set_item('namespace_array', value) @property def namespace_wrapped_array(self): """Gets the namespace_wrapped_array of this XmlItem. # noqa: E501 - - :return: The namespace_wrapped_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The namespace_wrapped_array of this XmlItem. # noqa: E501 """ - return self._namespace_wrapped_array + return self.__get_item('namespace_wrapped_array') @namespace_wrapped_array.setter - def namespace_wrapped_array(self, namespace_wrapped_array): # noqa: E501 - """Sets the namespace_wrapped_array of this XmlItem. - - - :param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501 - :type: list[int] + def namespace_wrapped_array(self, value): + """Sets the namespace_wrapped_array of this XmlItem. # noqa: E501 """ - - self._namespace_wrapped_array = ( - namespace_wrapped_array - ) + return self.__set_item('namespace_wrapped_array', value) @property def prefix_ns_string(self): """Gets the prefix_ns_string of this XmlItem. # noqa: E501 - - :return: The prefix_ns_string of this XmlItem. # noqa: E501 - :rtype: str + Returns: + (str): The prefix_ns_string of this XmlItem. # noqa: E501 """ - return self._prefix_ns_string + return self.__get_item('prefix_ns_string') @prefix_ns_string.setter - def prefix_ns_string(self, prefix_ns_string): # noqa: E501 - """Sets the prefix_ns_string of this XmlItem. - - - :param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501 - :type: str + def prefix_ns_string(self, value): + """Sets the prefix_ns_string of this XmlItem. # noqa: E501 """ - - self._prefix_ns_string = ( - prefix_ns_string - ) + return self.__set_item('prefix_ns_string', value) @property def prefix_ns_number(self): """Gets the prefix_ns_number of this XmlItem. # noqa: E501 - - :return: The prefix_ns_number of this XmlItem. # noqa: E501 - :rtype: float + Returns: + (float): The prefix_ns_number of this XmlItem. # noqa: E501 """ - return self._prefix_ns_number + return self.__get_item('prefix_ns_number') @prefix_ns_number.setter - def prefix_ns_number(self, prefix_ns_number): # noqa: E501 - """Sets the prefix_ns_number of this XmlItem. - - - :param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501 - :type: float + def prefix_ns_number(self, value): + """Sets the prefix_ns_number of this XmlItem. # noqa: E501 """ - - self._prefix_ns_number = ( - prefix_ns_number - ) + return self.__set_item('prefix_ns_number', value) @property def prefix_ns_integer(self): """Gets the prefix_ns_integer of this XmlItem. # noqa: E501 - - :return: The prefix_ns_integer of this XmlItem. # noqa: E501 - :rtype: int + Returns: + (int): The prefix_ns_integer of this XmlItem. # noqa: E501 """ - return self._prefix_ns_integer + return self.__get_item('prefix_ns_integer') @prefix_ns_integer.setter - def prefix_ns_integer(self, prefix_ns_integer): # noqa: E501 - """Sets the prefix_ns_integer of this XmlItem. - - - :param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501 - :type: int + def prefix_ns_integer(self, value): + """Sets the prefix_ns_integer of this XmlItem. # noqa: E501 """ - - self._prefix_ns_integer = ( - prefix_ns_integer - ) + return self.__set_item('prefix_ns_integer', value) @property def prefix_ns_boolean(self): """Gets the prefix_ns_boolean of this XmlItem. # noqa: E501 - - :return: The prefix_ns_boolean of this XmlItem. # noqa: E501 - :rtype: bool + Returns: + (bool): The prefix_ns_boolean of this XmlItem. # noqa: E501 """ - return self._prefix_ns_boolean + return self.__get_item('prefix_ns_boolean') @prefix_ns_boolean.setter - def prefix_ns_boolean(self, prefix_ns_boolean): # noqa: E501 - """Sets the prefix_ns_boolean of this XmlItem. - - - :param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501 - :type: bool + def prefix_ns_boolean(self, value): + """Sets the prefix_ns_boolean of this XmlItem. # noqa: E501 """ - - self._prefix_ns_boolean = ( - prefix_ns_boolean - ) + return self.__set_item('prefix_ns_boolean', value) @property def prefix_ns_array(self): """Gets the prefix_ns_array of this XmlItem. # noqa: E501 - - :return: The prefix_ns_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The prefix_ns_array of this XmlItem. # noqa: E501 """ - return self._prefix_ns_array + return self.__get_item('prefix_ns_array') @prefix_ns_array.setter - def prefix_ns_array(self, prefix_ns_array): # noqa: E501 - """Sets the prefix_ns_array of this XmlItem. - - - :param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501 - :type: list[int] + def prefix_ns_array(self, value): + """Sets the prefix_ns_array of this XmlItem. # noqa: E501 """ - - self._prefix_ns_array = ( - prefix_ns_array - ) + return self.__set_item('prefix_ns_array', value) @property def prefix_ns_wrapped_array(self): """Gets the prefix_ns_wrapped_array of this XmlItem. # noqa: E501 - - :return: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501 - :rtype: list[int] + Returns: + ([int]): The prefix_ns_wrapped_array of this XmlItem. # noqa: E501 """ - return self._prefix_ns_wrapped_array + return self.__get_item('prefix_ns_wrapped_array') @prefix_ns_wrapped_array.setter - def prefix_ns_wrapped_array(self, prefix_ns_wrapped_array): # noqa: E501 - """Sets the prefix_ns_wrapped_array of this XmlItem. - - - :param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501 - :type: list[int] + def prefix_ns_wrapped_array(self, value): + """Sets the prefix_ns_wrapped_array of this XmlItem. # noqa: E501 """ - - self._prefix_ns_wrapped_array = ( - prefix_ns_wrapped_array - ) + return self.__set_item('prefix_ns_wrapped_array', value) def to_dict(self): """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result + return model_to_dict(self, serialize=False) def to_str(self): """Returns the string representation of the model""" @@ -973,7 +716,22 @@ class XmlItem(ModelNormal): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in six.iteritems(self._data_store): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if (not six.PY3 and + len(types) == 2 and unicode in types): # noqa: F821 + vals_equal = ( + this_val.encode('utf-8') == that_val.encode('utf-8') + ) + if not vals_equal: + return False + return True def __ne__(self, other): """Returns true if both objects are not equal""" diff --git a/samples/client/petstore/python-experimental/requirements.txt b/samples/client/petstore/python-experimental/requirements.txt index bafdc07532f..eb358efd5bd 100644 --- a/samples/client/petstore/python-experimental/requirements.txt +++ b/samples/client/petstore/python-experimental/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/samples/client/petstore/python-experimental/setup.py b/samples/client/petstore/python-experimental/setup.py index 1d5e7c2915e..f99ea80ad63 100644 --- a/samples/client/petstore/python-experimental/setup.py +++ b/samples/client/petstore/python-experimental/setup.py @@ -22,17 +22,21 @@ VERSION = "1.0.0" # http://pypi.python.org/pypi/setuptools REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] +EXTRAS = {':python_version <= "2.7"': ['future']} setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, + extras_require=EXTRAS, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/python-experimental/test-requirements.txt b/samples/client/petstore/python-experimental/test-requirements.txt index 2702246c0e6..5816b874953 100644 --- a/samples/client/petstore/python-experimental/test-requirements.txt +++ b/samples/client/petstore/python-experimental/test-requirements.txt @@ -3,3 +3,5 @@ nose>=1.3.7 pluggy>=0.3.1 py>=1.4.31 randomize>=0.13 +mock; python_version<="2.7" + diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_array.py b/samples/client/petstore/python-experimental/test/test_additional_properties_array.py index c4cf43499cf..6c86292cd4a 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_array.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_array.py @@ -17,6 +17,9 @@ import unittest import petstore_api from petstore_api.models.additional_properties_array import AdditionalPropertiesArray # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError + +import datetime class TestAdditionalPropertiesArray(unittest.TestCase): @@ -30,9 +33,20 @@ class TestAdditionalPropertiesArray(unittest.TestCase): def testAdditionalPropertiesArray(self): """Test AdditionalPropertiesArray""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_array.AdditionalPropertiesArray() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesArray() + + # can make one with additional properties + some_val = [] + model = AdditionalPropertiesArray(some_key=some_val) + assert model['some_key'] == some_val + some_val = [True, datetime.date(1970,1,1), datetime.datetime(1970,1,1), {}, 3.1, 1, [], 'hello'] + model = AdditionalPropertiesArray(some_key=some_val) + assert model['some_key'] == some_val + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesArray(some_key='some string') if __name__ == '__main__': diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_boolean.py b/samples/client/petstore/python-experimental/test/test_additional_properties_boolean.py index cc3cecc8522..33bcfb90bb6 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_boolean.py @@ -17,6 +17,7 @@ import unittest import petstore_api from petstore_api.models.additional_properties_boolean import AdditionalPropertiesBoolean # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError class TestAdditionalPropertiesBoolean(unittest.TestCase): @@ -30,9 +31,16 @@ class TestAdditionalPropertiesBoolean(unittest.TestCase): def testAdditionalPropertiesBoolean(self): """Test AdditionalPropertiesBoolean""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_boolean.AdditionalPropertiesBoolean() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesBoolean() + + # can make one with additional properties + model = AdditionalPropertiesBoolean(some_key=True) + assert model['some_key'] == True + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesBoolean(some_key='True') if __name__ == '__main__': diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_integer.py b/samples/client/petstore/python-experimental/test/test_additional_properties_integer.py index 774c367b210..0029cb9c84c 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_integer.py @@ -17,6 +17,7 @@ import unittest import petstore_api from petstore_api.models.additional_properties_integer import AdditionalPropertiesInteger # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError class TestAdditionalPropertiesInteger(unittest.TestCase): @@ -30,9 +31,16 @@ class TestAdditionalPropertiesInteger(unittest.TestCase): def testAdditionalPropertiesInteger(self): """Test AdditionalPropertiesInteger""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_integer.AdditionalPropertiesInteger() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesInteger() + + # can make one with additional properties + model = AdditionalPropertiesInteger(some_key=3) + assert model['some_key'] == 3 + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesInteger(some_key=11.3) if __name__ == '__main__': diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_number.py b/samples/client/petstore/python-experimental/test/test_additional_properties_number.py index 0d370e781b3..28d0b23377a 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_number.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_number.py @@ -17,6 +17,7 @@ import unittest import petstore_api from petstore_api.models.additional_properties_number import AdditionalPropertiesNumber # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError class TestAdditionalPropertiesNumber(unittest.TestCase): @@ -30,10 +31,16 @@ class TestAdditionalPropertiesNumber(unittest.TestCase): def testAdditionalPropertiesNumber(self): """Test AdditionalPropertiesNumber""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_number.AdditionalPropertiesNumber() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesNumber() + # can make one with additional properties + model = AdditionalPropertiesNumber(some_key=11.3) + assert model['some_key'] == 11.3 + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesNumber(some_key=10) if __name__ == '__main__': unittest.main() diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_object.py b/samples/client/petstore/python-experimental/test/test_additional_properties_object.py index 6e718b28cde..3d135116736 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_object.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_object.py @@ -17,6 +17,9 @@ import unittest import petstore_api from petstore_api.models.additional_properties_object import AdditionalPropertiesObject # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError + +import datetime class TestAdditionalPropertiesObject(unittest.TestCase): @@ -30,9 +33,20 @@ class TestAdditionalPropertiesObject(unittest.TestCase): def testAdditionalPropertiesObject(self): """Test AdditionalPropertiesObject""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_object.AdditionalPropertiesObject() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesObject() + + # can make one with additional properties + some_val = {} + model = AdditionalPropertiesObject(some_key=some_val) + assert model['some_key'] == some_val + some_val = {'a': True, 'b': datetime.date(1970,1,1), 'c': datetime.datetime(1970,1,1), 'd': {}, 'e': 3.1, 'f': 1, 'g': [], 'h': 'hello'} + model = AdditionalPropertiesObject(some_key=some_val) + assert model['some_key'] == some_val + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesObject(some_key='some string') if __name__ == '__main__': diff --git a/samples/client/petstore/python-experimental/test/test_additional_properties_string.py b/samples/client/petstore/python-experimental/test/test_additional_properties_string.py index a46cb3e256d..0276334ead5 100644 --- a/samples/client/petstore/python-experimental/test/test_additional_properties_string.py +++ b/samples/client/petstore/python-experimental/test/test_additional_properties_string.py @@ -17,6 +17,7 @@ import unittest import petstore_api from petstore_api.models.additional_properties_string import AdditionalPropertiesString # noqa: E501 from petstore_api.rest import ApiException +from petstore_api.exceptions import ApiTypeError class TestAdditionalPropertiesString(unittest.TestCase): @@ -30,9 +31,16 @@ class TestAdditionalPropertiesString(unittest.TestCase): def testAdditionalPropertiesString(self): """Test AdditionalPropertiesString""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.models.additional_properties_string.AdditionalPropertiesString() # noqa: E501 - pass + # can make model without additional properties + model = AdditionalPropertiesString() + + # can make one with additional properties + model = AdditionalPropertiesString(some_key='some_val') + assert model['some_key'] == 'some_val' + + # type checking works on additional properties + with self.assertRaises(ApiTypeError) as exc: + model = AdditionalPropertiesString(some_key=True) if __name__ == '__main__': diff --git a/samples/client/petstore/python-experimental/test/test_fake_api.py b/samples/client/petstore/python-experimental/test/test_fake_api.py index e8877b915ec..0f4e875d197 100644 --- a/samples/client/petstore/python-experimental/test/test_fake_api.py +++ b/samples/client/petstore/python-experimental/test/test_fake_api.py @@ -46,8 +46,8 @@ class TestFakeApi(unittest.TestCase): """ # verify that the input and output are type OuterEnum endpoint = self.api.fake_outer_enum_serialize - assert endpoint.openapi_types['body'] == 'OuterEnum' - assert endpoint.settings['response_type'] == 'OuterEnum' + assert endpoint.openapi_types['body'] == (petstore_api.OuterEnum,) + assert endpoint.settings['response_type'] == (petstore_api.OuterEnum,) def test_fake_outer_number_serialize(self): """Test case for fake_outer_number_serialize @@ -55,8 +55,8 @@ class TestFakeApi(unittest.TestCase): """ # verify that the input and output are the correct type endpoint = self.api.fake_outer_number_serialize - assert endpoint.openapi_types['body'] == 'OuterNumber' - assert endpoint.settings['response_type'] == 'OuterNumber' + assert endpoint.openapi_types['body'] == (petstore_api.OuterNumber,) + assert endpoint.settings['response_type'] == (petstore_api.OuterNumber,) def test_fake_outer_string_serialize(self): """Test case for fake_outer_string_serialize diff --git a/samples/client/petstore/python-experimental/test/test_format_test.py b/samples/client/petstore/python-experimental/test/test_format_test.py index ba20d7f811b..ed926aa031e 100644 --- a/samples/client/petstore/python-experimental/test/test_format_test.py +++ b/samples/client/petstore/python-experimental/test/test_format_test.py @@ -10,6 +10,7 @@ from __future__ import absolute_import +import datetime import unittest import petstore_api @@ -24,7 +25,7 @@ class TestFormatTest(unittest.TestCase): self.required_named_args = dict( number=40.1, byte='what', - date='2019-03-23', + date=datetime.date(2019, 3, 23), password='rainbowtable' ) diff --git a/samples/client/petstore/python-experimental/testfiles/1px_pic1.png b/samples/client/petstore/python-experimental/testfiles/1px_pic1.png new file mode 100644 index 00000000000..7d3a386a210 Binary files /dev/null and b/samples/client/petstore/python-experimental/testfiles/1px_pic1.png differ diff --git a/samples/client/petstore/python-experimental/testfiles/1px_pic2.png b/samples/client/petstore/python-experimental/testfiles/1px_pic2.png new file mode 100644 index 00000000000..7d3a386a210 Binary files /dev/null and b/samples/client/petstore/python-experimental/testfiles/1px_pic2.png differ diff --git a/samples/client/petstore/python-experimental/tests/test_api_client.py b/samples/client/petstore/python-experimental/tests/test_api_client.py index a41dbaba9c9..ad50f186201 100644 --- a/samples/client/petstore/python-experimental/tests/test_api_client.py +++ b/samples/client/petstore/python-experimental/tests/test_api_client.py @@ -170,3 +170,9 @@ class ApiClientTests(unittest.TestCase): data = [pet] result = self.api_client.sanitize_for_serialization(data) self.assertEqual(result, list_of_pet_dict) + + # model with additional proerties + model_dict = {'some_key': True} + model = petstore_api.StringBooleanMap(**model_dict) + result = self.api_client.sanitize_for_serialization(model) + self.assertEqual(result, model_dict) diff --git a/samples/client/petstore/python-experimental/tests/test_deserialization.py b/samples/client/petstore/python-experimental/tests/test_deserialization.py index 10c5ecef423..9ab64b04bba 100644 --- a/samples/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/client/petstore/python-experimental/tests/test_deserialization.py @@ -15,12 +15,26 @@ import time import unittest import datetime +import six + import petstore_api +from petstore_api.exceptions import ( + ApiTypeError, + ApiKeyError, + ApiValueError, +) + +from petstore_api.model_utils import ( + file_type, + int, + str, +) + +from petstore_api.rest import RESTResponse MockResponse = namedtuple('MockResponse', 'data') - class DeserializationTests(unittest.TestCase): def setUp(self): @@ -40,7 +54,8 @@ class DeserializationTests(unittest.TestCase): } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, 'dict(str, EnumTest)') + deserialized = self.deserialize(response, + ({str: (petstore_api.EnumTest,)},), True) self.assertTrue(isinstance(deserialized, dict)) self.assertTrue( isinstance(deserialized['enum_test'], petstore_api.EnumTest)) @@ -80,7 +95,8 @@ class DeserializationTests(unittest.TestCase): } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, 'dict(str, Pet)') + deserialized = self.deserialize(response, + ({str: (petstore_api.Pet,)},), True) self.assertTrue(isinstance(deserialized, dict)) self.assertTrue(isinstance(deserialized['pet'], petstore_api.Pet)) @@ -88,15 +104,15 @@ class DeserializationTests(unittest.TestCase): """ deserialize dict(str, Dog), use discriminator""" data = { 'dog': { - "id": 0, "className": "Dog", "color": "white", - "bread": "Jack Russel Terrier" + "breed": "Jack Russel Terrier" } } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, 'dict(str, Animal)') + deserialized = self.deserialize(response, + ({str: (petstore_api.Animal,)},), True) self.assertTrue(isinstance(deserialized, dict)) self.assertTrue(isinstance(deserialized['dog'], petstore_api.Dog)) @@ -107,7 +123,7 @@ class DeserializationTests(unittest.TestCase): } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, 'dict(str, int)') + deserialized = self.deserialize(response, ({str: (int,)},), True) self.assertTrue(isinstance(deserialized, dict)) self.assertTrue(isinstance(deserialized['integer'], int)) @@ -116,7 +132,7 @@ class DeserializationTests(unittest.TestCase): data = "test str" response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "str") + deserialized = self.deserialize(response, (str,), True) self.assertTrue(isinstance(deserialized, str)) def test_deserialize_date(self): @@ -124,7 +140,7 @@ class DeserializationTests(unittest.TestCase): data = "1997-07-16" response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "date") + deserialized = self.deserialize(response, (datetime.date,), True) self.assertTrue(isinstance(deserialized, datetime.date)) def test_deserialize_datetime(self): @@ -132,7 +148,7 @@ class DeserializationTests(unittest.TestCase): data = "1997-07-16T19:20:30.45+01:00" response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "datetime") + deserialized = self.deserialize(response, (datetime.datetime,), True) self.assertTrue(isinstance(deserialized, datetime.datetime)) def test_deserialize_pet(self): @@ -157,7 +173,7 @@ class DeserializationTests(unittest.TestCase): } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "Pet") + deserialized = self.deserialize(response, (petstore_api.Pet,), True) self.assertTrue(isinstance(deserialized, petstore_api.Pet)) self.assertEqual(deserialized.id, 0) self.assertEqual(deserialized.name, "doggie") @@ -207,7 +223,8 @@ class DeserializationTests(unittest.TestCase): }] response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "list[Pet]") + deserialized = self.deserialize(response, + ([petstore_api.Pet],), True) self.assertTrue(isinstance(deserialized, list)) self.assertTrue(isinstance(deserialized[0], petstore_api.Pet)) self.assertEqual(deserialized[0].id, 0) @@ -224,7 +241,8 @@ class DeserializationTests(unittest.TestCase): } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "dict(str, dict(str, int))") + deserialized = self.deserialize(response, + ({str: ({str: (int,)},)},), True) self.assertTrue(isinstance(deserialized, dict)) self.assertTrue(isinstance(deserialized["foo"], dict)) self.assertTrue(isinstance(deserialized["foo"]["bar"], int)) @@ -234,7 +252,7 @@ class DeserializationTests(unittest.TestCase): data = [["foo"]] response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, "list[list[str]]") + deserialized = self.deserialize(response, ([[str]],), True) self.assertTrue(isinstance(deserialized, list)) self.assertTrue(isinstance(deserialized[0], list)) self.assertTrue(isinstance(deserialized[0][0], str)) @@ -243,16 +261,22 @@ class DeserializationTests(unittest.TestCase): """ deserialize None """ response = MockResponse(data=json.dumps(None)) - deserialized = self.deserialize(response, "datetime") - self.assertIsNone(deserialized) + error_msg = ( + "Invalid type for variable 'received_data'. Required value type is " + "datetime and passed type was NoneType at ['received_data']" + ) + with self.assertRaises(ApiTypeError) as exc: + deserialized = self.deserialize(response, (datetime.datetime,), True) + self.assertEqual(str(exc.exception), error_msg) def test_deserialize_OuterEnum(self): """ deserialize OuterEnum """ # make sure that an exception is thrown on an invalid value - with self.assertRaises(petstore_api.ApiValueError): + with self.assertRaises(ApiValueError): self.deserialize( MockResponse(data=json.dumps("test str")), - "OuterEnum" + (petstore_api.OuterEnum,), + True ) # valid value works @@ -260,29 +284,100 @@ class DeserializationTests(unittest.TestCase): petstore_api.OuterEnum.allowed_values[('value',)]["PLACED"] ) response = MockResponse(data=json.dumps(placed_str)) - outer_enum = self.deserialize(response, "OuterEnum") + outer_enum = self.deserialize(response, + (petstore_api.OuterEnum,), True) self.assertTrue(isinstance(outer_enum, petstore_api.OuterEnum)) self.assertTrue(outer_enum.value == placed_str) def test_deserialize_OuterNumber(self): """ deserialize OuterNumber """ # make sure that an exception is thrown on an invalid type value - with self.assertRaises(petstore_api.ApiValueError): + with self.assertRaises(ApiTypeError): deserialized = self.deserialize( MockResponse(data=json.dumps("test str")), - "OuterNumber" + (petstore_api.OuterNumber,), + True ) # make sure that an exception is thrown on an invalid value - with self.assertRaises(petstore_api.ApiValueError): + with self.assertRaises(ApiValueError): deserialized = self.deserialize( - MockResponse(data=json.dumps(21)), - "OuterNumber" + MockResponse(data=json.dumps(21.0)), + (petstore_api.OuterNumber,), + True ) # valid value works - number_val = 11 + number_val = 11.0 response = MockResponse(data=json.dumps(number_val)) - outer_number = self.deserialize(response, "OuterNumber") + outer_number = self.deserialize(response, + (petstore_api.OuterNumber,), True) self.assertTrue(isinstance(outer_number, petstore_api.OuterNumber)) - self.assertTrue(outer_number.value == number_val) \ No newline at end of file + self.assertTrue(outer_number.value == number_val) + + def test_deserialize_file(self): + """Ensures that file deserialization works""" + response_types_mixed = (file_type,) + + # sample from http://www.jtricks.com/download-text + HTTPResponse = namedtuple( + 'urllib3_response_HTTPResponse', + ['status', 'reason', 'data', 'getheaders', 'getheader'] + ) + headers = {'Content-Disposition': 'attachment; filename=content.txt'} + def get_headers(): + return headers + def get_header(name, default=None): + return headers.get(name, default) + file_data = ( + "You are reading text file that was supposed to be downloaded\r\n" + "to your hard disk. If your browser offered to save you the file," + "\r\nthen it handled the Content-Disposition header correctly." + ) + http_response = HTTPResponse( + status=200, + reason='OK', + data=file_data, + getheaders=get_headers, + getheader=get_header + ) + # response which is deserialized to a file + mock_response = RESTResponse(http_response) + file_path = None + try: + file_object = self.deserialize( + mock_response, response_types_mixed, True) + self.assertTrue(isinstance(file_object, file_type)) + file_path = file_object.name + self.assertFalse(file_object.closed) + file_object.close() + if six.PY3: + file_data = file_data.encode('utf-8') + with open(file_path, 'rb') as other_file_object: + self.assertEqual(other_file_object.read(), file_data) + finally: + os.unlink(file_path) + + def test_deserialize_string_boolean_map(self): + """ + Ensures that string boolean (additional properties) + deserialization works + """ + # make sure that an exception is thrown on an invalid type + with self.assertRaises(ApiTypeError): + deserialized = self.deserialize( + MockResponse(data=json.dumps("test str")), + (petstore_api.StringBooleanMap,), + True + ) + + # valid value works + item_val = {'some_key': True} + response = MockResponse(data=json.dumps(item_val)) + model = petstore_api.StringBooleanMap(**item_val) + deserialized = self.deserialize(response, + (petstore_api.StringBooleanMap,), True) + self.assertTrue(isinstance(deserialized, petstore_api.StringBooleanMap)) + self.assertTrue(deserialized['some_key'] == True) + self.assertTrue(deserialized == model) + diff --git a/samples/client/petstore/python-experimental/tests/test_enum_arrays.py b/samples/client/petstore/python-experimental/tests/test_enum_arrays.py index 2f7e347f9c3..9ef5e2532a3 100644 --- a/samples/client/petstore/python-experimental/tests/test_enum_arrays.py +++ b/samples/client/petstore/python-experimental/tests/test_enum_arrays.py @@ -15,6 +15,11 @@ import unittest import petstore_api +from petstore_api.exceptions import ( + ApiTypeError, + ApiKeyError, + ApiValueError, +) class EnumArraysTests(unittest.TestCase): @@ -24,7 +29,9 @@ class EnumArraysTests(unittest.TestCase): # fish_or_crab = petstore_api.EnumArrays(just_symbol=">=") self.assertEqual(fish_or_crab.just_symbol, ">=") - self.assertEqual(fish_or_crab.array_enum, None) + # if optional property is unset we raise an exception + with self.assertRaises(ApiKeyError) as exc: + self.assertEqual(fish_or_crab.array_enum, None) fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["fish"]) self.assertEqual(fish_or_crab.just_symbol, "$") @@ -34,7 +41,7 @@ class EnumArraysTests(unittest.TestCase): self.assertEqual(fish_or_crab.just_symbol, ">=") self.assertEqual(fish_or_crab.array_enum, ["fish"]) - fish_or_crab = petstore_api.EnumArrays("$", ["crab"]) + fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["crab"]) self.assertEqual(fish_or_crab.just_symbol, "$") self.assertEqual(fish_or_crab.array_enum, ["crab"]) @@ -42,23 +49,14 @@ class EnumArraysTests(unittest.TestCase): # # Check if setting invalid values fails # - try: + with self.assertRaises(ApiValueError) as exc: fish_or_crab = petstore_api.EnumArrays(just_symbol="<=") - self.assertTrue(0) - except ValueError: - self.assertTrue(1) - try: + with self.assertRaises(ApiValueError) as exc: fish_or_crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["dog"]) - self.assertTrue(0) - except ValueError: - self.assertTrue(1) - try: - fish_or_crab = petstore_api.EnumArrays(just_symbol=["$"], array_enum=["dog"]) - self.assertTrue(0) - except ValueError: - self.assertTrue(1) + with self.assertRaises(ApiTypeError) as exc: + fish_or_crab = petstore_api.EnumArrays(just_symbol=["$"], array_enum=["crab"]) def test_enumarrays_setter(self): @@ -82,13 +80,13 @@ class EnumArraysTests(unittest.TestCase): fish_or_crab.array_enum = ["fish", "fish", "fish"] self.assertEqual(fish_or_crab.array_enum, ["fish", "fish", "fish"]) - + fish_or_crab.array_enum = ["crab"] self.assertEqual(fish_or_crab.array_enum, ["crab"]) - + fish_or_crab.array_enum = ["crab", "fish"] self.assertEqual(fish_or_crab.array_enum, ["crab", "fish"]) - + fish_or_crab.array_enum = ["crab", "fish", "crab", "fish"] self.assertEqual(fish_or_crab.array_enum, ["crab", "fish", "crab", "fish"]) @@ -96,30 +94,20 @@ class EnumArraysTests(unittest.TestCase): # Check if setting invalid values fails # fish_or_crab = petstore_api.EnumArrays() - try: - fish_or_crab.just_symbol = "!=" - except ValueError: - self.assertEqual(fish_or_crab.just_symbol, None) - - try: + with self.assertRaises(ApiValueError) as exc: + fish_or_crab.just_symbol = "!=" + + with self.assertRaises(ApiTypeError) as exc: fish_or_crab.just_symbol = ["fish"] - except ValueError: - self.assertEqual(fish_or_crab.just_symbol, None) - - try: + + with self.assertRaises(ApiValueError) as exc: fish_or_crab.array_enum = ["cat"] - except ValueError: - self.assertEqual(fish_or_crab.array_enum, None) - try: + with self.assertRaises(ApiValueError) as exc: fish_or_crab.array_enum = ["fish", "crab", "dog"] - except ValueError: - self.assertEqual(fish_or_crab.array_enum, None) - try: + with self.assertRaises(ApiTypeError) as exc: fish_or_crab.array_enum = "fish" - except ValueError: - self.assertEqual(fish_or_crab.array_enum, None) def test_todict(self): @@ -131,7 +119,8 @@ class EnumArraysTests(unittest.TestCase): 'array_enum': ["fish", "crab"] } - dollar_fish_crab = petstore_api.EnumArrays("$", ["fish", "crab"]) + dollar_fish_crab = petstore_api.EnumArrays( + just_symbol="$", array_enum=["fish", "crab"]) self.assertEqual(dollar_fish_crab_dict, dollar_fish_crab.to_dict()) @@ -143,7 +132,8 @@ class EnumArraysTests(unittest.TestCase): 'array_enum': ["crab", "fish"] } - dollar_fish_crab = petstore_api.EnumArrays("$", ["fish", "crab"]) + dollar_fish_crab = petstore_api.EnumArrays( + just_symbol="$", array_enum=["fish", "crab"]) self.assertNotEqual(dollar_crab_fish_dict, dollar_fish_crab.to_dict()) @@ -152,14 +142,14 @@ class EnumArraysTests(unittest.TestCase): # # Check if object comparison works # - fish1 = petstore_api.EnumArrays("$", ["fish"]) - fish2 = petstore_api.EnumArrays("$", ["fish"]) + fish1 = petstore_api.EnumArrays(just_symbol="$", array_enum=["fish"]) + fish2 = petstore_api.EnumArrays(just_symbol="$", array_enum=["fish"]) self.assertEqual(fish1, fish2) - fish = petstore_api.EnumArrays("$", ["fish"]) - crab = petstore_api.EnumArrays("$", ["crab"]) - self.assertNotEqual(fish, crab) + fish = petstore_api.EnumArrays(just_symbol="$", array_enum=["fish"]) + crab = petstore_api.EnumArrays(just_symbol="$", array_enum=["crab"]) + self.assertNotEqual(fish, crab) - dollar = petstore_api.EnumArrays("$") - greater = petstore_api.EnumArrays(">=") - self.assertNotEqual(dollar, greater) \ No newline at end of file + dollar = petstore_api.EnumArrays(just_symbol="$") + greater = petstore_api.EnumArrays(just_symbol=">=") + self.assertNotEqual(dollar, greater) \ No newline at end of file diff --git a/samples/client/petstore/python-experimental/tests/test_map_test.py b/samples/client/petstore/python-experimental/tests/test_map_test.py index 6031cebf3a2..13db5181c9e 100644 --- a/samples/client/petstore/python-experimental/tests/test_map_test.py +++ b/samples/client/petstore/python-experimental/tests/test_map_test.py @@ -15,6 +15,12 @@ import unittest import petstore_api +from petstore_api.exceptions import ( + ApiTypeError, + ApiKeyError, + ApiValueError, +) + class MapTestTests(unittest.TestCase): @@ -23,7 +29,7 @@ class MapTestTests(unittest.TestCase): # Test MapTest construction with valid values # up_or_low_dict = { - 'UPPER': "UP", + 'UPPER': "UP", 'lower': "low" } map_enum_test = petstore_api.MapTest(map_of_enum_string=up_or_low_dict) @@ -31,8 +37,6 @@ class MapTestTests(unittest.TestCase): self.assertEqual(map_enum_test.map_of_enum_string, up_or_low_dict) map_of_map_of_strings = { - 'val1': 1, - 'valText': "Text", 'valueDict': up_or_low_dict } map_enum_test = petstore_api.MapTest(map_map_of_string=map_of_map_of_strings) @@ -43,7 +47,7 @@ class MapTestTests(unittest.TestCase): # Make sure that the init fails for invalid enum values # black_or_white_dict = { - 'black': "UP", + 'black': "UP", 'white': "low" } try: @@ -58,7 +62,7 @@ class MapTestTests(unittest.TestCase): # map_enum_test = petstore_api.MapTest() up_or_low_dict = { - 'UPPER': "UP", + 'UPPER': "UP", 'lower': "low" } map_enum_test.map_of_enum_string = up_or_low_dict @@ -69,13 +73,11 @@ class MapTestTests(unittest.TestCase): # map_enum_test = petstore_api.MapTest() black_or_white_dict = { - 'black': "UP", + 'black': "UP", 'white': "low" } - try: + with self.assertRaises(ApiValueError) as exc: map_enum_test.map_of_enum_string = black_or_white_dict - except ValueError: - self.assertEqual(map_enum_test.map_of_enum_string, None) def test_todict(self): # @@ -83,17 +85,15 @@ class MapTestTests(unittest.TestCase): # map_enum_test = petstore_api.MapTest() up_or_low_dict = { - 'UPPER': "UP", + 'UPPER': "UP", 'lower': "low" } map_of_map_of_strings = { - 'val1': 1, - 'valText': "Text", 'valueDict': up_or_low_dict } - indirect_map = { + indirect_map = petstore_api.StringBooleanMap(**{ 'option1': True - } + }) direct_map = { 'option2': False } @@ -101,7 +101,7 @@ class MapTestTests(unittest.TestCase): map_enum_test.map_map_of_string = map_of_map_of_strings map_enum_test.indirect_map = indirect_map map_enum_test.direct_map = direct_map - + self.assertEqual(map_enum_test.map_of_enum_string, up_or_low_dict) self.assertEqual(map_enum_test.map_map_of_string, map_of_map_of_strings) self.assertEqual(map_enum_test.indirect_map, indirect_map) @@ -110,7 +110,7 @@ class MapTestTests(unittest.TestCase): expected_dict = { 'map_of_enum_string': up_or_low_dict, 'map_map_of_string': map_of_map_of_strings, - 'indirect_map': indirect_map, + 'indirect_map': indirect_map.to_dict(), 'direct_map': direct_map } diff --git a/samples/client/petstore/python-experimental/tests/test_pet_api.py b/samples/client/petstore/python-experimental/tests/test_pet_api.py index f536f5ca288..5e1dd8528c9 100644 --- a/samples/client/petstore/python-experimental/tests/test_pet_api.py +++ b/samples/client/petstore/python-experimental/tests/test_pet_api.py @@ -11,19 +11,35 @@ $ cd petstore_api-python $ nosetests -v """ +from collections import namedtuple +import json import os import unittest import petstore_api from petstore_api import Configuration -from petstore_api.rest import ApiException +from petstore_api.rest import ( + RESTClientObject, + RESTResponse +) + +import six + +from petstore_api.exceptions import ( + ApiException, + ApiValueError, + ApiTypeError, +) from .util import id_gen -import json - import urllib3 +if six.PY3: + from unittest.mock import patch +else: + from mock import patch + HOST = 'http://localhost/v2' @@ -78,7 +94,6 @@ class PetApiTests(unittest.TestCase): def setUpFiles(self): self.test_file_dir = os.path.join(os.path.dirname(__file__), "..", "testfiles") self.test_file_dir = os.path.realpath(self.test_file_dir) - self.foo = os.path.join(self.test_file_dir, "foo.png") def test_preload_content_flag(self): self.pet_api.add_pet(self.pet) @@ -173,7 +188,7 @@ class PetApiTests(unittest.TestCase): def test_async_exception(self): self.pet_api.add_pet(self.pet) - thread = self.pet_api.get_pet_by_id("-9999999999999", async_req=True) + thread = self.pet_api.get_pet_by_id(-9999999999999, async_req=True) exception = None try: @@ -246,21 +261,108 @@ class PetApiTests(unittest.TestCase): def test_upload_file(self): # upload file with form parameter + file_path1 = os.path.join(self.test_file_dir, "1px_pic1.png") + file_path2 = os.path.join(self.test_file_dir, "1px_pic2.png") try: + file = open(file_path1, "rb") additional_metadata = "special" self.pet_api.upload_file( pet_id=self.pet.id, additional_metadata=additional_metadata, - file=self.foo + file=file ) except ApiException as e: self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file.close() - # upload only file + # upload only one file try: - self.pet_api.upload_file(pet_id=self.pet.id, file=self.foo) + file = open(file_path1, "rb") + self.pet_api.upload_file(pet_id=self.pet.id, file=file) except ApiException as e: self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file.close() + + # upload multiple files + HTTPResponse = namedtuple( + 'urllib3_response_HTTPResponse', + ['status', 'reason', 'data', 'getheaders', 'getheader'] + ) + headers = {} + def get_headers(): + return headers + def get_header(name, default=None): + return headers.get(name, default) + api_respponse = { + 'code': 200, + 'type': 'blah', + 'message': 'file upload succeeded' + } + http_response = HTTPResponse( + status=200, + reason='OK', + data=json.dumps(api_respponse), + getheaders=get_headers, + getheader=get_header + ) + mock_response = RESTResponse(http_response) + try: + file1 = open(file_path1, "rb") + file2 = open(file_path2, "rb") + with patch.object(RESTClientObject, 'request') as mock_method: + mock_method.return_value = mock_response + res = self.pet_api.upload_file( + pet_id=684696917, files=[file1, file2]) + mock_method.assert_called_with( + 'POST', + 'http://localhost/v2/pet/684696917/uploadImage', + _preload_content=True, + _request_timeout=None, + body=None, + headers={ + 'Accept': 'application/json', + 'Content-Type': 'multipart/form-data', + 'User-Agent': 'OpenAPI-Generator/1.0.0/python', + 'Authorization': 'Bearer ' + }, + post_params=[ + ('files', ('1px_pic1.png', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x00:~\x9bU\x00\x00\x00\nIDATx\x9cc\xfa\x0f\x00\x01\x05\x01\x02\xcf\xa0.\xcd\x00\x00\x00\x00IEND\xaeB`\x82', 'image/png')), + ('files', ('1px_pic2.png', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x00:~\x9bU\x00\x00\x00\nIDATx\x9cc\xfa\x0f\x00\x01\x05\x01\x02\xcf\xa0.\xcd\x00\x00\x00\x00IEND\xaeB`\x82', 'image/png')) + ], + query_params=[] + ) + except ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + finally: + file1.close() + file2.close() + + # passing in an array of files to when file only allows one + # raises an exceptions + try: + file = open(file_path1, "rb") + with self.assertRaises(ApiTypeError) as exc: + self.pet_api.upload_file(pet_id=self.pet.id, file=[file]) + finally: + file.close() + + # passing in a single file when an array of file is required + # raises an exception + try: + file = open(file_path1, "rb") + with self.assertRaises(ApiTypeError) as exc: + self.pet_api.upload_file(pet_id=self.pet.id, files=file) + finally: + file.close() + + # passing in a closed file raises an exception + with self.assertRaises(ApiValueError) as exc: + file = open(file_path1, "rb") + file.close() + self.pet_api.upload_file(pet_id=self.pet.id, file=file) + def test_delete_pet(self): self.pet_api.add_pet(self.pet) diff --git a/samples/client/petstore/python-experimental/tests/test_pet_model.py b/samples/client/petstore/python-experimental/tests/test_pet_model.py index 70ab1a007a0..c3352015b97 100644 --- a/samples/client/petstore/python-experimental/tests/test_pet_model.py +++ b/samples/client/petstore/python-experimental/tests/test_pet_model.py @@ -36,7 +36,7 @@ class PetModelTests(unittest.TestCase): " 'name': 'test name',\n" " 'photo_urls': ['string'],\n" " 'status': 'available',\n" - " 'tags': [{'id': 1, 'name': None}]}") + " 'tags': [{'id': 1}]}") self.assertEqual(data, self.pet.to_str()) def test_equal(self): diff --git a/samples/client/petstore/python-tornado/docs/ClassModel.md b/samples/client/petstore/python-tornado/docs/ClassModel.md index 7f6f6d17211..657d51a944d 100644 --- a/samples/client/petstore/python-tornado/docs/ClassModel.md +++ b/samples/client/petstore/python-tornado/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/File.md b/samples/client/petstore/python-tornado/docs/File.md index 6a925f0a7af..f17ba0057d0 100644 --- a/samples/client/petstore/python-tornado/docs/File.md +++ b/samples/client/petstore/python-tornado/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/Model200Response.md b/samples/client/petstore/python-tornado/docs/Model200Response.md index 30f47cae521..40d0d7828e1 100644 --- a/samples/client/petstore/python-tornado/docs/Model200Response.md +++ b/samples/client/petstore/python-tornado/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/ModelReturn.md b/samples/client/petstore/python-tornado/docs/ModelReturn.md index 2b03798e301..65ec73ddae7 100644 --- a/samples/client/petstore/python-tornado/docs/ModelReturn.md +++ b/samples/client/petstore/python-tornado/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/Name.md b/samples/client/petstore/python-tornado/docs/Name.md index 17dc7a38fe6..807b76afc6e 100644 --- a/samples/client/petstore/python-tornado/docs/Name.md +++ b/samples/client/petstore/python-tornado/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 6824bec06ef..bd360c4b05f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -289,7 +290,7 @@ class ApiClient(object): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -342,18 +343,19 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - return thread + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -579,7 +581,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -589,7 +590,7 @@ class ApiClient(object): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -598,7 +599,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py index 8bc62757860..0df679d29f4 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py @@ -32,6 +32,8 @@ class EnumClass(object): _EFG = "-efg" _XYZ_ = "(xyz)" + allowable_values = [_ABC, _EFG, _XYZ_] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py index 8fbfeb7aaea..bcea632b3f5 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py @@ -32,6 +32,8 @@ class OuterEnum(object): APPROVED = "approved" DELIVERED = "delivered" + allowable_values = [PLACED, APPROVED, DELIVERED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python-tornado/requirements.txt b/samples/client/petstore/python-tornado/requirements.txt index bafdc07532f..eb358efd5bd 100644 --- a/samples/client/petstore/python-tornado/requirements.txt +++ b/samples/client/petstore/python-tornado/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/samples/client/petstore/python-tornado/setup.py b/samples/client/petstore/python-tornado/setup.py index 6ed0ebf5009..921be1b7eae 100644 --- a/samples/client/petstore/python-tornado/setup.py +++ b/samples/client/petstore/python-tornado/setup.py @@ -28,12 +28,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/python/docs/ClassModel.md b/samples/client/petstore/python/docs/ClassModel.md index 7f6f6d17211..657d51a944d 100644 --- a/samples/client/petstore/python/docs/ClassModel.md +++ b/samples/client/petstore/python/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/File.md b/samples/client/petstore/python/docs/File.md index 6a925f0a7af..f17ba0057d0 100644 --- a/samples/client/petstore/python/docs/File.md +++ b/samples/client/petstore/python/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/Model200Response.md b/samples/client/petstore/python/docs/Model200Response.md index 30f47cae521..40d0d7828e1 100644 --- a/samples/client/petstore/python/docs/Model200Response.md +++ b/samples/client/petstore/python/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/ModelReturn.md b/samples/client/petstore/python/docs/ModelReturn.md index 2b03798e301..65ec73ddae7 100644 --- a/samples/client/petstore/python/docs/ModelReturn.md +++ b/samples/client/petstore/python/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/Name.md b/samples/client/petstore/python/docs/Name.md index 17dc7a38fe6..807b76afc6e 100644 --- a/samples/client/petstore/python/docs/Name.md +++ b/samples/client/petstore/python/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index f9c494a76c3..5e7a95a35f3 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -287,7 +288,7 @@ class ApiClient(object): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -340,18 +341,19 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - return thread + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -577,7 +579,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -587,7 +588,7 @@ class ApiClient(object): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -596,7 +597,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python/petstore_api/models/enum_class.py b/samples/client/petstore/python/petstore_api/models/enum_class.py index 8bc62757860..0df679d29f4 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python/petstore_api/models/enum_class.py @@ -32,6 +32,8 @@ class EnumClass(object): _EFG = "-efg" _XYZ_ = "(xyz)" + allowable_values = [_ABC, _EFG, _XYZ_] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python/petstore_api/models/outer_enum.py b/samples/client/petstore/python/petstore_api/models/outer_enum.py index 8fbfeb7aaea..bcea632b3f5 100644 --- a/samples/client/petstore/python/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python/petstore_api/models/outer_enum.py @@ -32,6 +32,8 @@ class OuterEnum(object): APPROVED = "approved" DELIVERED = "delivered" + allowable_values = [PLACED, APPROVED, DELIVERED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name diff --git a/samples/client/petstore/python/requirements.txt b/samples/client/petstore/python/requirements.txt index bafdc07532f..eb358efd5bd 100644 --- a/samples/client/petstore/python/requirements.txt +++ b/samples/client/petstore/python/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index 1d5e7c2915e..2a3ca48e06b 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -27,12 +27,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 """ diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594242e..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3cd82..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fab6b..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index c1c4a98b9a1..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.5.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist deleted file mode 100644 index cba258550bd..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m deleted file mode 100644 index 749b412f85c..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PetstoreClient : NSObject -@end -@implementation PodsDummy_PetstoreClient -@end diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 2a366623a36..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap deleted file mode 100644 index 7fdfc46cf79..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PetstoreClient { - umbrella header "PetstoreClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m deleted file mode 100644 index 6236440163b..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClient : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClient -@end diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index b7da51aaf25..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap deleted file mode 100644 index ef919b6c0d1..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClient { - umbrella header "Pods-SwaggerClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown deleted file mode 100644 index 102af753851..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist deleted file mode 100644 index 7acbad1eabb..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m deleted file mode 100644 index bb17fa2b80f..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClientTests : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClientTests -@end diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh deleted file mode 100755 index 08e3eaaca45..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index b2e4925a9e4..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap deleted file mode 100644 index a848da7ffb3..00000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClientTests { - umbrella header "Pods-SwaggerClientTests-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE deleted file mode 100644 index c547fa84913..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h deleted file mode 100644 index 756ba7b7b4d..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h +++ /dev/null @@ -1,38 +0,0 @@ -@import Foundation.NSError; -@import Foundation.NSPointerArray; - -#if TARGET_OS_IPHONE - #define NSPointerArrayMake(N) ({ \ - NSPointerArray *aa = [NSPointerArray strongObjectsPointerArray]; \ - aa.count = N; \ - aa; \ - }) -#else - static inline NSPointerArray * __nonnull NSPointerArrayMake(NSUInteger count) { - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSPointerArray *aa = [[NSPointerArray class] respondsToSelector:@selector(strongObjectsPointerArray)] - ? [NSPointerArray strongObjectsPointerArray] - : [NSPointerArray pointerArrayWithStrongObjects]; - #pragma clang diagnostic pop - aa.count = count; - return aa; - } -#endif - -#define IsError(o) [o isKindOfClass:[NSError class]] -#define IsPromise(o) [o isKindOfClass:[AnyPromise class]] - -#import "AnyPromise.h" - -@interface AnyPromise (Swift) -- (AnyPromise * __nonnull)__thenOn:(__nonnull dispatch_queue_t)q execute:(id __nullable (^ __nonnull)(id __nullable))body; -- (AnyPromise * __nonnull)__catchOn:(__nonnull dispatch_queue_t)q withPolicy:(PMKCatchPolicy)policy execute:(id __nullable (^ __nonnull)(id __nullable))body; -- (AnyPromise * __nonnull)__alwaysOn:(__nonnull dispatch_queue_t)q execute:(void (^ __nonnull)(void))body; -- (void)__pipe:(void(^ __nonnull)(__nullable id))body; -- (AnyPromise * __nonnull)initWithResolverBlock:(void (^ __nonnull)(PMKResolver __nonnull))resolver; -@end - -extern NSError * __nullable PMKProcessUnhandledException(id __nonnull thrown); - -@class PMKArray; diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m deleted file mode 100644 index c0f81f4c30b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m +++ /dev/null @@ -1,141 +0,0 @@ -#import "PMKCallVariadicBlock.m" -#import "AnyPromise+Private.h" - -extern dispatch_queue_t PMKDefaultDispatchQueue(void); - -NSString *const PMKErrorDomain = @"PMKErrorDomain"; - - -@implementation AnyPromise (objc) - -- (instancetype)initWithResolver:(PMKResolver __strong *)resolver { - return [[self class] promiseWithResolverBlock:^(PMKResolver resolve){ - *resolver = resolve; - }]; -} - -- (AnyPromise *(^)(id))then { - return ^(id block) { - return [self __thenOn:PMKDefaultDispatchQueue() execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))thenOn { - return ^(dispatch_queue_t queue, id block) { - return [self __thenOn:queue execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))thenInBackground { - return ^(id block) { - return [self __thenOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))catchOn { - return ^(dispatch_queue_t q, id block) { - return [self __catchOn:q withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catch { - return ^(id block) { - return [self __catchOn:PMKDefaultDispatchQueue() withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catchInBackground { - return ^(id block) { - return [self __catchOn:dispatch_get_global_queue(0, 0) withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, PMKCatchPolicy, id))catchOnWithPolicy { - return ^(dispatch_queue_t q, PMKCatchPolicy policy, id block) { - return [self __catchOn:q withPolicy:policy execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(PMKCatchPolicy, id))catchWithPolicy { - return ^(PMKCatchPolicy policy, id block) { - return [self __catchOn:PMKDefaultDispatchQueue() withPolicy:policy execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_block_t))always { - return ^(dispatch_block_t block) { - return [self __alwaysOn:PMKDefaultDispatchQueue() execute:block]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, dispatch_block_t))alwaysOn { - return ^(dispatch_queue_t queue, dispatch_block_t block) { - return [self __alwaysOn:queue execute:block]; - }; -} - -@end - - - -@implementation AnyPromise (Adapters) - -+ (instancetype)promiseWithAdapterBlock:(void (^)(PMKAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(id value, id error){ - resolve(error ?: value); - }); - }]; -} - -+ (instancetype)promiseWithIntegerAdapterBlock:(void (^)(PMKIntegerAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(NSInteger value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -+ (instancetype)promiseWithBooleanAdapterBlock:(void (^)(PMKBooleanAdapter adapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(BOOL value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -- (id)value { - id obj = [self valueForKey:@"__value"]; - - if ([obj isKindOfClass:[PMKArray class]]) { - return obj[0]; - } else { - return obj; - } -} - -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift deleted file mode 100644 index 2c912129e2b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift +++ /dev/null @@ -1,53 +0,0 @@ -import Dispatch - -extension DispatchQueue { - /** - Submits a block for asynchronous execution on a dispatch queue. - - DispatchQueue.global().promise { - try md5(input) - }.then { md5 in - //… - } - - - Parameter body: The closure that resolves this promise. - - Returns: A new promise resolved by the result of the provided closure. - - - SeeAlso: `DispatchQueue.async(group:qos:flags:execute:)` - - SeeAlso: `dispatch_promise()` - - SeeAlso: `dispatch_promise_on()` - */ - public final func promise(group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () throws -> T) -> Promise { - - return Promise(sealant: { resolve in - async(group: group, qos: qos, flags: flags) { - do { - resolve(.fulfilled(try body())) - } catch { - resolve(Resolution(error)) - } - } - }) - } - - /// Unavailable due to Swift compiler issues - @available(*, unavailable) - public final func promise(group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: () throws -> Promise) -> Promise { fatalError() } - - /** - The default queue for all handlers. - - Defaults to `DispatchQueue.main`. - - - SeeAlso: `PMKDefaultDispatchQueue()` - - SeeAlso: `PMKSetDefaultDispatchQueue()` - */ - class public final var `default`: DispatchQueue { - get { - return __PMKDefaultDispatchQueue() - } - set { - __PMKSetDefaultDispatchQueue(newValue) - } - } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m deleted file mode 100644 index c156cde9480..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "PromiseKit.h" - -@interface NSError (PMK) -- (BOOL)isCancelled; -@end - -static dispatch_once_t __PMKDefaultDispatchQueueToken; -static dispatch_queue_t __PMKDefaultDispatchQueue; - -dispatch_queue_t PMKDefaultDispatchQueue() { - dispatch_once(&__PMKDefaultDispatchQueueToken, ^{ - if (__PMKDefaultDispatchQueue == nil) { - __PMKDefaultDispatchQueue = dispatch_get_main_queue(); - } - }); - return __PMKDefaultDispatchQueue; -} - -void PMKSetDefaultDispatchQueue(dispatch_queue_t newDefaultQueue) { - dispatch_once(&__PMKDefaultDispatchQueueToken, ^{ - __PMKDefaultDispatchQueue = newDefaultQueue; - }); -} - - -static dispatch_once_t __PMKErrorUnhandlerToken; -static void (^__PMKErrorUnhandler)(NSError *); - -void PMKUnhandledErrorHandler(NSError *error) { - dispatch_once(&__PMKErrorUnhandlerToken, ^{ - if (__PMKErrorUnhandler == nil) { - __PMKErrorUnhandler = ^(NSError *error){ - if (!error.isCancelled) { - NSLog(@"PromiseKit: unhandled error: %@", error); - } - }; - } - }); - return __PMKErrorUnhandler(error); -} - -void PMKSetUnhandledErrorHandler(void(^newHandler)(NSError *)) { - dispatch_once(&__PMKErrorUnhandlerToken, ^{ - __PMKErrorUnhandler = newHandler; - }); -} - - -static dispatch_once_t __PMKUnhandledExceptionHandlerToken; -static NSError *(^__PMKUnhandledExceptionHandler)(id); - -NSError *PMKProcessUnhandledException(id thrown) { - - dispatch_once(&__PMKUnhandledExceptionHandlerToken, ^{ - __PMKUnhandledExceptionHandler = ^id(id reason){ - if ([reason isKindOfClass:[NSError class]]) - return reason; - if ([reason isKindOfClass:[NSString class]]) - return [NSError errorWithDomain:PMKErrorDomain code:PMKUnexpectedError userInfo:@{NSLocalizedDescriptionKey: reason}]; - return nil; - }; - }); - - id err = __PMKUnhandledExceptionHandler(thrown); - if (!err) { - NSLog(@"PromiseKit no longer catches *all* exceptions. However you can change this behavior by setting a new PMKProcessUnhandledException handler."); - @throw thrown; - } - return err; -} - -void PMKSetUnhandledExceptionHandler(NSError *(^newHandler)(id)) { - dispatch_once(&__PMKUnhandledExceptionHandlerToken, ^{ - __PMKUnhandledExceptionHandler = newHandler; - }); -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m deleted file mode 100644 index 700c1b37ef7..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m +++ /dev/null @@ -1,77 +0,0 @@ -#import - -struct PMKBlockLiteral { - void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock - int flags; - int reserved; - void (*invoke)(void *, ...); - struct block_descriptor { - unsigned long int reserved; // NULL - unsigned long int size; // sizeof(struct Block_literal_1) - // optional helper functions - void (*copy_helper)(void *dst, void *src); // IFF (1<<25) - void (*dispose_helper)(void *src); // IFF (1<<25) - // required ABI.2010.3.16 - const char *signature; // IFF (1<<30) - } *descriptor; - // imported variables -}; - -typedef NS_OPTIONS(NSUInteger, PMKBlockDescriptionFlags) { - PMKBlockDescriptionFlagsHasCopyDispose = (1 << 25), - PMKBlockDescriptionFlagsHasCtor = (1 << 26), // helpers have C++ code - PMKBlockDescriptionFlagsIsGlobal = (1 << 28), - PMKBlockDescriptionFlagsHasStret = (1 << 29), // IFF BLOCK_HAS_SIGNATURE - PMKBlockDescriptionFlagsHasSignature = (1 << 30) -}; - -// It appears 10.7 doesn't support quotes in method signatures. Remove them -// via @rabovik's method. See https://github.com/OliverLetterer/SLObjectiveCRuntimeAdditions/pull/2 -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 -NS_INLINE static const char * pmk_removeQuotesFromMethodSignature(const char *str){ - char *result = malloc(strlen(str) + 1); - BOOL skip = NO; - char *to = result; - char c; - while ((c = *str++)) { - if ('"' == c) { - skip = !skip; - continue; - } - if (skip) continue; - *to++ = c; - } - *to = '\0'; - return result; -} -#endif - -static NSMethodSignature *NSMethodSignatureForBlock(id block) { - if (!block) - return nil; - - struct PMKBlockLiteral *blockRef = (__bridge struct PMKBlockLiteral *)block; - PMKBlockDescriptionFlags flags = (PMKBlockDescriptionFlags)blockRef->flags; - - if (flags & PMKBlockDescriptionFlagsHasSignature) { - void *signatureLocation = blockRef->descriptor; - signatureLocation += sizeof(unsigned long int); - signatureLocation += sizeof(unsigned long int); - - if (flags & PMKBlockDescriptionFlagsHasCopyDispose) { - signatureLocation += sizeof(void(*)(void *dst, void *src)); - signatureLocation += sizeof(void (*)(void *src)); - } - - const char *signature = (*(const char **)signatureLocation); -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 - signature = pmk_removeQuotesFromMethodSignature(signature); - NSMethodSignature *nsSignature = [NSMethodSignature signatureWithObjCTypes:signature]; - free((void *)signature); - - return nsSignature; -#endif - return [NSMethodSignature signatureWithObjCTypes:signature]; - } - return 0; -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m deleted file mode 100644 index f89197ec04e..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m +++ /dev/null @@ -1,114 +0,0 @@ -#import "NSMethodSignatureForBlock.m" -#import -#import -#import "AnyPromise+Private.h" -#import -#import -#import - -#ifndef PMKLog -#define PMKLog NSLog -#endif - -@interface PMKArray : NSObject { -@public - id objs[3]; - NSUInteger count; -} @end - -@implementation PMKArray - -- (id)objectAtIndexedSubscript:(NSUInteger)idx { - if (count <= idx) { - // this check is necessary due to lack of checks in `pmk_safely_call_block` - return nil; - } - return objs[idx]; -} - -@end - -id __PMKArrayWithCount(NSUInteger count, ...) { - PMKArray *this = [PMKArray new]; - this->count = count; - va_list args; - va_start(args, count); - for (NSUInteger x = 0; x < count; ++x) - this->objs[x] = va_arg(args, id); - va_end(args); - return this; -} - - -static inline id _PMKCallVariadicBlock(id frock, id result) { - NSCAssert(frock, @""); - - NSMethodSignature *sig = NSMethodSignatureForBlock(frock); - const NSUInteger nargs = sig.numberOfArguments; - const char rtype = sig.methodReturnType[0]; - - #define call_block_with_rtype(type) ({^type{ \ - switch (nargs) { \ - case 1: \ - return ((type(^)(void))frock)(); \ - case 2: { \ - const id arg = [result class] == [PMKArray class] ? result[0] : result; \ - return ((type(^)(id))frock)(arg); \ - } \ - case 3: { \ - type (^block)(id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1]) \ - : block(result, nil); \ - } \ - case 4: { \ - type (^block)(id, id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1], result[2]) \ - : block(result, nil, nil); \ - } \ - default: \ - @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"PromiseKit: The provided block’s argument count is unsupported." userInfo:nil]; \ - }}();}) - - switch (rtype) { - case 'v': - call_block_with_rtype(void); - return nil; - case '@': - return call_block_with_rtype(id) ?: nil; - case '*': { - char *str = call_block_with_rtype(char *); - return str ? @(str) : nil; - } - case 'c': return @(call_block_with_rtype(char)); - case 'i': return @(call_block_with_rtype(int)); - case 's': return @(call_block_with_rtype(short)); - case 'l': return @(call_block_with_rtype(long)); - case 'q': return @(call_block_with_rtype(long long)); - case 'C': return @(call_block_with_rtype(unsigned char)); - case 'I': return @(call_block_with_rtype(unsigned int)); - case 'S': return @(call_block_with_rtype(unsigned short)); - case 'L': return @(call_block_with_rtype(unsigned long)); - case 'Q': return @(call_block_with_rtype(unsigned long long)); - case 'f': return @(call_block_with_rtype(float)); - case 'd': return @(call_block_with_rtype(double)); - case 'B': return @(call_block_with_rtype(_Bool)); - case '^': - if (strcmp(sig.methodReturnType, "^v") == 0) { - call_block_with_rtype(void); - return nil; - } - // else fall through! - default: - @throw [NSException exceptionWithName:@"PromiseKit" reason:@"PromiseKit: Unsupported method signature." userInfo:nil]; - } -} - -static id PMKCallVariadicBlock(id frock, id result) { - @try { - return _PMKCallVariadicBlock(frock, result); - } @catch (id thrown) { - return PMKProcessUnhandledException(thrown); - } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift deleted file mode 100644 index 5d77d4c8332..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift +++ /dev/null @@ -1,41 +0,0 @@ -import class Dispatch.DispatchQueue - -extension Promise { - /** - The provided closure executes once this promise resolves. - - - Parameter on: The queue on which the provided closure executes. - - Parameter body: The closure that is executed when this promise fulfills. - - Returns: A new promise that resolves when the `AnyPromise` returned from the provided closure resolves. For example: - - URLSession.GET(url).then { (data: NSData) -> AnyPromise in - //… - return SCNetworkReachability() - }.then { _ in - //… - } - */ - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> AnyPromise) -> Promise { - return Promise(sealant: { resolve in - state.then(on: q, else: resolve) { value in - try body(value).state.pipe(resolve) - } - }) - } - - @available(*, unavailable, message: "unwrap the promise") - public func then(on: DispatchQueue = .default, execute body: (T) throws -> AnyPromise?) -> Promise { fatalError() } -} - -/** - `firstly` can make chains more readable. -*/ -public func firstly(execute body: () throws -> AnyPromise) -> Promise { - return Promise(sealant: { resolve in - do { - try body().state.pipe(resolve) - } catch { - resolve(Resolution(error)) - } - }) -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift deleted file mode 100644 index 251ea6dcb4b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift +++ /dev/null @@ -1,57 +0,0 @@ -extension Promise { - /** - - Returns: The error with which this promise was rejected; `nil` if this promise is not rejected. - */ - public var error: Error? { - switch state.get() { - case .none: - return nil - case .some(.fulfilled): - return nil - case .some(.rejected(let error, _)): - return error - } - } - - /** - - Returns: `true` if the promise has not yet resolved. - */ - public var isPending: Bool { - return state.get() == nil - } - - /** - - Returns: `true` if the promise has resolved. - */ - public var isResolved: Bool { - return !isPending - } - - /** - - Returns: `true` if the promise was fulfilled. - */ - public var isFulfilled: Bool { - return value != nil - } - - /** - - Returns: `true` if the promise was rejected. - */ - public var isRejected: Bool { - return error != nil - } - - /** - - Returns: The value with which this promise was fulfilled or `nil` if this promise is pending or rejected. - */ - public var value: T? { - switch state.get() { - case .none: - return nil - case .some(.fulfilled(let value)): - return value - case .some(.rejected): - return nil - } - } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h deleted file mode 100644 index 2651530cbc9..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "fwd.h" -#import "AnyPromise.h" - -#import // `FOUNDATION_EXPORT` - -FOUNDATION_EXPORT double PromiseKitVersionNumber; -FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m deleted file mode 100644 index 25f9966fc59..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; -@import Foundation.NSDate; -@import Foundation.NSValue; - -/// @return A promise that fulfills after the specified duration. -AnyPromise *PMKAfter(NSTimeInterval duration) { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)); - dispatch_after(time, dispatch_get_global_queue(0, 0), ^{ - resolve(@(duration)); - }); - }]; -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift deleted file mode 100644 index 902dc4264a3..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift +++ /dev/null @@ -1,37 +0,0 @@ -import struct Foundation.TimeInterval -import Dispatch - -/** - - Returns: A new promise that fulfills after the specified duration. -*/ -@available(*, deprecated: 4.3, message: "Use after(seconds:)") -public func after(interval: TimeInterval) -> Promise { - return after(seconds: interval) -} - -/** - after(.seconds(2)).then { - } - -- Returns: A new promise that fulfills after the specified duration. -*/ -public func after(seconds: TimeInterval) -> Promise { - return Promise { fulfill, _ in - let when = DispatchTime.now() + seconds - DispatchQueue.global().asyncAfter(deadline: when) { fulfill(()) } - } -} - -/** - - Returns: A new promise that fulfills after the specified duration. -*/ -public func after(interval: DispatchTimeInterval) -> Promise { - return Promise { fulfill, _ in - let when = DispatchTime.now() + interval - #if swift(>=4.0) - DispatchQueue.global().asyncAfter(deadline: when) { fulfill(()) } - #else - DispatchQueue.global().asyncAfter(deadline: when, execute: fulfill) - #endif - } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m deleted file mode 100644 index ecb89f71118..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; - -AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) { - return [AnyPromise promiseWithValue:nil].thenOn(queue, block); -} - -AnyPromise *dispatch_promise(id block) { - return dispatch_promise_on(dispatch_get_global_queue(0, 0), block); -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m deleted file mode 100644 index 1065d91f2f3..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m +++ /dev/null @@ -1,29 +0,0 @@ -#import "AnyPromise.h" -#import "AnyPromise+Private.h" -@import CoreFoundation.CFRunLoop; - -/** - Suspends the active thread waiting on the provided promise. - - @return The value of the provided promise once resolved. - */ -id PMKHang(AnyPromise *promise) { - if (promise.pending) { - static CFRunLoopSourceContext context; - - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - CFRunLoopSourceRef runLoopSource = CFRunLoopSourceCreate(NULL, 0, &context); - CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - - promise.always(^{ - CFRunLoopStop(runLoop); - }); - while (promise.pending) { - CFRunLoopRun(); - } - CFRunLoopRemoveSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - CFRelease(runLoopSource); - } - - return promise.value; -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m deleted file mode 100644 index 979f092df08..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m +++ /dev/null @@ -1,54 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" -#import - -/** - Waits on all provided promises. - - `PMKWhen` rejects as soon as one of the provided promises rejects. `PMKJoin` waits on all provided promises, then rejects if any of those promises rejects, otherwise it fulfills with values from the provided promises. - - - Returns: A new promise that resolves once all the provided promises resolve. -*/ -AnyPromise *PMKJoin(NSArray *promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKJoin(nil)"}]]; - - if (promises.count == 0) - return [AnyPromise promiseWithValue:promises]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSPointerArray *results = NSPointerArrayMake(promises.count); - __block atomic_int countdown = promises.count; - __block BOOL rejected = NO; - - [promises enumerateObjectsUsingBlock:^(AnyPromise *promise, NSUInteger ii, BOOL *stop) { - [promise __pipe:^(id value) { - - if (IsError(value)) { - rejected = YES; - } - - //FIXME surely this isn't thread safe on multiple cores? - [results replacePointerAtIndex:ii withPointer:(__bridge void *)(value ?: [NSNull null])]; - - atomic_fetch_sub_explicit(&countdown, 1, memory_order_relaxed); - - if (countdown == 0) { - if (!rejected) { - resolve(results.allObjects); - } else { - id userInfo = @{PMKJoinPromisesKey: promises}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKJoinError userInfo:userInfo]; - resolve(err); - } - } - }]; - - (void) stop; - }]; - }]; -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift deleted file mode 100644 index 9ff17005c9e..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift +++ /dev/null @@ -1,40 +0,0 @@ -/** - Resolves with the first resolving promise from a set of promises. - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: A new promise that resolves when the first promise in the provided promises resolves. - - Warning: If any of the provided promises reject, the returned promise is rejected. - - Warning: aborts if the array is empty. -*/ -public func race(promises: [Promise]) -> Promise { - guard promises.count > 0 else { - fatalError("Cannot race with an empty array of promises") - } - return _race(promises: promises) -} - -/** - Resolves with the first resolving promise from a set of promises. - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: A new promise that resolves when the first promise in the provided promises resolves. - - Warning: If any of the provided promises reject, the returned promise is rejected. - - Warning: aborts if the array is empty. -*/ -public func race(_ promises: Promise...) -> Promise { - return _race(promises: promises) -} - -private func _race(promises: [Promise]) -> Promise { - return Promise(sealant: { resolve in - for promise in promises { - promise.state.pipe(resolve) - } - }) -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m deleted file mode 100644 index cafb54720c9..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m +++ /dev/null @@ -1,100 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -@import Foundation.NSProgress; -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" - -// NSProgress resources: -// * https://robots.thoughtbot.com/asynchronous-nsprogress -// * http://oleb.net/blog/2014/03/nsprogress/ -// NSProgress! Beware! -// * https://github.com/AFNetworking/AFNetworking/issues/2261 - -/** - Wait for all promises in a set to resolve. - - @note If *any* of the provided promises reject, the returned promise is immediately rejected with that error. - @warning In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. - @param promises The promises upon which to wait before the returned promise resolves. - @note PMKWhen provides NSProgress. - @return A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. -*/ -AnyPromise *PMKWhen(id promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKWhen(nil)"}]]; - - if ([promises isKindOfClass:[NSArray class]] || [promises isKindOfClass:[NSDictionary class]]) { - if ([promises count] == 0) - return [AnyPromise promiseWithValue:promises]; - } else if ([promises isKindOfClass:[AnyPromise class]]) { - promises = @[promises]; - } else { - return [AnyPromise promiseWithValue:promises]; - } - -#ifndef PMKDisableProgress - NSProgress *progress = [NSProgress progressWithTotalUnitCount:(int64_t)[promises count]]; - progress.pausable = NO; - progress.cancellable = NO; -#else - struct PMKProgress { - int completedUnitCount; - int totalUnitCount; - double fractionCompleted; - }; - __block struct PMKProgress progress; -#endif - - __block int32_t countdown = (int32_t)[promises count]; - BOOL const isdict = [promises isKindOfClass:[NSDictionary class]]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSInteger index = 0; - - for (__strong id key in promises) { - AnyPromise *promise = isdict ? promises[key] : key; - if (!isdict) key = @(index); - - if (![promise isKindOfClass:[AnyPromise class]]) - promise = [AnyPromise promiseWithValue:promise]; - - [promise __pipe:^(id value){ - if (progress.fractionCompleted >= 1) - return; - - if (IsError(value)) { - progress.completedUnitCount = progress.totalUnitCount; - - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:[value userInfo] ?: @{}]; - userInfo[PMKFailingPromiseIndexKey] = key; - [userInfo setObject:value forKey:NSUnderlyingErrorKey]; - id err = [[NSError alloc] initWithDomain:[value domain] code:[value code] userInfo:userInfo]; - resolve(err); - } - else if (OSAtomicDecrement32(&countdown) == 0) { - progress.completedUnitCount = progress.totalUnitCount; - - id results; - if (isdict) { - results = [NSMutableDictionary new]; - for (id key in promises) { - id promise = promises[key]; - results[key] = IsPromise(promise) ? ((AnyPromise *)promise).value : promise; - } - } else { - results = [NSMutableArray new]; - for (AnyPromise *promise in promises) { - id value = IsPromise(promise) ? (promise.value ?: [NSNull null]) : promise; - [results addObject:value]; - } - } - resolve(results); - } else { - progress.completedUnitCount++; - } - }]; - } - }]; -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594242e..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3cd82..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fab6b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist deleted file mode 100644 index cba258550bd..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m deleted file mode 100644 index 749b412f85c..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PetstoreClient : NSObject -@end -@implementation PodsDummy_PetstoreClient -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 2a366623a36..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap deleted file mode 100644 index 7fdfc46cf79..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PetstoreClient { - umbrella header "PetstoreClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m deleted file mode 100644 index 6236440163b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClient : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClient -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index b7da51aaf25..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap deleted file mode 100644 index ef919b6c0d1..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClient { - umbrella header "Pods-SwaggerClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown deleted file mode 100644 index 102af753851..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist deleted file mode 100644 index 7acbad1eabb..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m deleted file mode 100644 index bb17fa2b80f..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClientTests : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClientTests -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh deleted file mode 100755 index 08e3eaaca45..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index b2e4925a9e4..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap deleted file mode 100644 index a848da7ffb3..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClientTests { - umbrella header "Pods-SwaggerClientTests-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist deleted file mode 100644 index df276491a16..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.4.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m deleted file mode 100644 index ce92451305b..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PromiseKit : NSObject -@end -@implementation PodsDummy_PromiseKit -@end diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap deleted file mode 100644 index 2b26033e4ab..00000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PromiseKit { - umbrella header "PromiseKit-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md deleted file mode 100644 index d6765d9c9b9..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -**The MIT License** -**Copyright © 2015 Krunoslav Zaher** -**All rights reserved.** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift deleted file mode 100644 index 552314a1690..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// DispatchQueue+Extensions.swift -// Platform -// -// Created by Krunoslav Zaher on 10/22/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch - -extension DispatchQueue { - private static var token: DispatchSpecificKey<()> = { - let key = DispatchSpecificKey<()>() - DispatchQueue.main.setSpecific(key: key, value: ()) - return key - }() - - static var isMain: Bool { - return DispatchQueue.getSpecific(key: token) != nil - } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift deleted file mode 100644 index c03471d502f..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// RecursiveLock.swift -// Platform -// -// Created by Krunoslav Zaher on 12/18/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSRecursiveLock - -#if TRACE_RESOURCES - class RecursiveLock: NSRecursiveLock { - override init() { - _ = Resources.incrementTotal() - super.init() - } - - override func lock() { - super.lock() - _ = Resources.incrementTotal() - } - - override func unlock() { - super.unlock() - _ = Resources.decrementTotal() - } - - deinit { - _ = Resources.decrementTotal() - } - } -#else - typealias RecursiveLock = NSRecursiveLock -#endif diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift deleted file mode 100644 index d89c5aa70b9..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ObservableConvertibleType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Type that can be converted to observable sequence (`Observable`). -public protocol ObservableConvertibleType { - /// Type of elements in sequence. - associatedtype E - - /// Converts `self` to `Observable` sequence. - /// - /// - returns: Observable sequence that represents `self`. - func asObservable() -> Observable -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift deleted file mode 100644 index b87399664f3..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Reactive.swift -// RxSwift -// -// Created by Yury Korolev on 5/2/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/** - Use `Reactive` proxy as customization point for constrained protocol extensions. - - General pattern would be: - - // 1. Extend Reactive protocol with constrain on Base - // Read as: Reactive Extension where Base is a SomeType - extension Reactive where Base: SomeType { - // 2. Put any specific reactive extension for SomeType here - } - - With this approach we can have more specialized methods and properties using - `Base` and not just specialized on common base type. - - */ - -public struct Reactive { - /// Base object to extend. - public let base: Base - - /// Creates extensions with base object. - /// - /// - parameter base: Base object. - public init(_ base: Base) { - self.base = base - } -} - -/// A type that has reactive extensions. -public protocol ReactiveCompatible { - /// Extended type - associatedtype CompatibleType - - /// Reactive extensions. - static var rx: Reactive.Type { get set } - - /// Reactive extensions. - var rx: Reactive { get set } -} - -extension ReactiveCompatible { - /// Reactive extensions. - public static var rx: Reactive.Type { - get { - return Reactive.self - } - set { - // this enables using Reactive to "mutate" base type - } - } - - /// Reactive extensions. - public var rx: Reactive { - get { - return Reactive(self) - } - set { - // this enables using Reactive to "mutate" base object - } - } -} - -import class Foundation.NSObject - -/// Extend NSObject with `rx` proxy. -extension NSObject: ReactiveCompatible { } diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift deleted file mode 100644 index 0dba4336a74..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// InvocableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol InvocableType { - func invoke() -} - -protocol InvocableWithValueType { - associatedtype Value - - func invoke(_ value: Value) -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594242e..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3cd82..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fab6b..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist deleted file mode 100644 index cba258550bd..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m deleted file mode 100644 index 749b412f85c..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PetstoreClient : NSObject -@end -@implementation PodsDummy_PetstoreClient -@end diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 2a366623a36..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap deleted file mode 100644 index 7fdfc46cf79..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PetstoreClient { - umbrella header "PetstoreClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m deleted file mode 100644 index 6236440163b..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClient : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClient -@end diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index b7da51aaf25..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap deleted file mode 100644 index ef919b6c0d1..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClient { - umbrella header "Pods-SwaggerClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown deleted file mode 100644 index 102af753851..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist deleted file mode 100644 index 7acbad1eabb..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m deleted file mode 100644 index bb17fa2b80f..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClientTests : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClientTests -@end diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh deleted file mode 100755 index 08e3eaaca45..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index b2e4925a9e4..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap deleted file mode 100644 index a848da7ffb3..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClientTests { - umbrella header "Pods-SwaggerClientTests-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-dummy.m b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-dummy.m deleted file mode 100644 index 3783f72cea3..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_RxSwift : NSObject -@end -@implementation PodsDummy_RxSwift -@end diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h deleted file mode 100644 index 9a272119378..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double RxSwiftVersionNumber; -FOUNDATION_EXPORT const unsigned char RxSwiftVersionString[]; - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift.modulemap b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift.modulemap deleted file mode 100644 index eae3d1c4187..00000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/Target Support Files/RxSwift/RxSwift.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module RxSwift { - umbrella header "RxSwift-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/default/.gitignore b/samples/client/petstore/swift4/default/.gitignore index 5e5d5cebcf4..586cc3f2d73 100644 --- a/samples/client/petstore/swift4/default/.gitignore +++ b/samples/client/petstore/swift4/default/.gitignore @@ -43,18 +43,18 @@ playground.xcworkspace # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts +Carthage/Checkouts Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index 0e97bd19efb..c3a2c7076fa 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/Package.swift b/samples/client/petstore/swift4/default/Package.swift new file mode 100644 index 00000000000..e5c5f0f33b8 --- /dev/null +++ b/samples/client/petstore/swift4/default/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj index 6d0f6ef15b4..334ca2d1924 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj @@ -3,272 +3,272 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -276,12 +276,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -289,100 +289,100 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -399,7 +399,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -407,7 +410,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -462,11 +465,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -483,7 +486,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -491,7 +497,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -536,8 +542,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -545,25 +551,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453..e8ac84fa992 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 7bd1267e95f..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a3..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da8907..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f5..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index 28cb30ce7b4..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ - -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca3728..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c6..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb1..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f2893..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 7ed6aad907b..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ - -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index ce9ffe4fb38..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ - -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e7..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5d..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd100..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index 076082af842..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ - -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e9..00000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore new file mode 100644 index 00000000000..0269c2f56db --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock index ec15c4176b8..d61e9910d1c 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock @@ -7,7 +7,7 @@ DEPENDENCIES: - PetstoreClient (from `../`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Alamofire EXTERNAL SOURCES: @@ -20,4 +20,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d -COCOAPODS: 1.6.1 +COCOAPODS: 1.8.0.beta.2 diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/LICENSE b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/LICENSE deleted file mode 100644 index 38a301a1db8..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/README.md deleted file mode 100644 index 9fdc9c73873..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/README.md +++ /dev/null @@ -1,242 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) -[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Alamofire is an HTTP networking library written in Swift. - -- [Features](#features) -- [Component Libraries](#component-libraries) -- [Requirements](#requirements) -- [Migration Guides](#migration-guides) -- [Communication](#communication) -- [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md) - - **Intro -** [Making a Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-a-request), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameter Encoding](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#parameter-encoding), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) -- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) - - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-manager), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-delegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request) - - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests) - - **Model Objects -** [Custom Response Serialization](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#custom-response-serialization) - - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability) -- [Open Radars](#open-radars) -- [FAQ](#faq) -- [Credits](#credits) -- [Donations](#donations) -- [License](#license) - -## Features - -- [x] Chainable Request / Response Methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download File using Request or Resume Data -- [x] Authentication with URLCredential -- [x] HTTP Response Validation -- [x] Upload and Download Progress Closures with Progress -- [x] cURL Command Output -- [x] Dynamically Adapt and Retry Requests -- [x] TLS Certificate and Public Key Pinning -- [x] Network Reachability -- [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.3+ -- Swift 3.1+ - -## Migration Guides - -- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication -- If you **need help with making network requests**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. -- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. -- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue and follow the guide. The more detail the better! -- If you **want to contribute**, submit a pull request. - -## Installation - -### CocoaPods - -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 1.7+ is required to build Alamofire 4.9+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '10.0' -use_frameworks! - -target '' do - pod 'Alamofire', '~> 4.9' -end -``` - -Then, run the following command: - -```bash -$ pod install -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](https://brew.sh/) using the following command: - -```bash -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 4.9 -``` - -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - -### Swift Package Manager - -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. - -Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. - -#### Swift 3 - -```swift -dependencies: [ - .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) -] -``` - -#### Swift 4 - -```swift -dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") -] -``` - -### Manually - -If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - - ```bash - $ git init - ``` - -- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command: - - ```bash - $ git submodule add https://github.com/Alamofire/Alamofire.git - ``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- And that's it! - - > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Open Radars - -The following radars have some effect on the current implementation of Alamofire. - -- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- `rdar://26870455` - Background URL Session Configurations do not work in the simulator -- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - -## Resolved Radars - -The following radars have been resolved over time after being filed against the Alamofire project. - -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - -### What logic belongs in a Router vs. a Request Adapter? - -Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. - -The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization. -Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. -Donating to the ASF will enable us to: - -- Pay our yearly legal fees to keep the non-profit in good status -- Pay for our mail servers to help us stay on top of all questions and security issues -- Potentially fund test servers to make it easier for us to test the edge cases -- Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. -We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. -With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. -If you use any of our libraries for work, see if your employers would be interested in donating. -Any amount you can donate today to help us reach our goal would be greatly appreciated. - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ) - -## License - -Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift deleted file mode 100644 index b163f6038fa..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift +++ /dev/null @@ -1,460 +0,0 @@ -// -// AFError.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with -/// their own associated reasons. -/// -/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. -/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. -/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. -/// - responseValidationFailed: Returned when a `validate()` call fails. -/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. -public enum AFError: Error { - /// The underlying reason the parameter encoding error occurred. - /// - /// - missingURL: The URL request did not have a URL to encode. - /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the - /// encoding process. - /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during - /// encoding process. - public enum ParameterEncodingFailureReason { - case missingURL - case jsonEncodingFailed(error: Error) - case propertyListEncodingFailed(error: Error) - } - - /// The underlying reason the multipart encoding error occurred. - /// - /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a - /// file URL. - /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty - /// `lastPathComponent` or `pathExtension. - /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. - /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw - /// an error. - /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. - /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by - /// the system. - /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided - /// threw an error. - /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. - /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the - /// encoded data to disk. - /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file - /// already exists at the provided `fileURL`. - /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is - /// not a file URL. - /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an - /// underlying error. - /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with - /// underlying system error. - public enum MultipartEncodingFailureReason { - case bodyPartURLInvalid(url: URL) - case bodyPartFilenameInvalid(in: URL) - case bodyPartFileNotReachable(at: URL) - case bodyPartFileNotReachableWithError(atURL: URL, error: Error) - case bodyPartFileIsDirectory(at: URL) - case bodyPartFileSizeNotAvailable(at: URL) - case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) - case bodyPartInputStreamCreationFailed(for: URL) - - case outputStreamCreationFailed(for: URL) - case outputStreamFileAlreadyExists(at: URL) - case outputStreamURLInvalid(url: URL) - case outputStreamWriteFailed(error: Error) - - case inputStreamReadFailed(error: Error) - } - - /// The underlying reason the response validation error occurred. - /// - /// - dataFileNil: The data file containing the server response did not exist. - /// - dataFileReadFailed: The data file containing the server response could not be read. - /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` - /// provided did not contain wildcard type. - /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided - /// `acceptableContentTypes`. - /// - unacceptableStatusCode: The response status code was not acceptable. - public enum ResponseValidationFailureReason { - case dataFileNil - case dataFileReadFailed(at: URL) - case missingContentType(acceptableContentTypes: [String]) - case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) - case unacceptableStatusCode(code: Int) - } - - /// The underlying reason the response serialization error occurred. - /// - /// - inputDataNil: The server response contained no data. - /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. - /// - inputFileNil: The file containing the server response did not exist. - /// - inputFileReadFailed: The file containing the server response could not be read. - /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. - /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. - /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. - public enum ResponseSerializationFailureReason { - case inputDataNil - case inputDataNilOrZeroLength - case inputFileNil - case inputFileReadFailed(at: URL) - case stringSerializationFailed(encoding: String.Encoding) - case jsonSerializationFailed(error: Error) - case propertyListSerializationFailed(error: Error) - } - - case invalidURL(url: URLConvertible) - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) - case multipartEncodingFailed(reason: MultipartEncodingFailureReason) - case responseValidationFailed(reason: ResponseValidationFailureReason) - case responseSerializationFailed(reason: ResponseSerializationFailureReason) -} - -// MARK: - Adapt Error - -struct AdaptError: Error { - let error: Error -} - -extension Error { - var underlyingAdaptError: Error? { return (self as? AdaptError)?.error } -} - -// MARK: - Error Booleans - -extension AFError { - /// Returns whether the AFError is an invalid URL error. - public var isInvalidURLError: Bool { - if case .invalidURL = self { return true } - return false - } - - /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncodingError: Bool { - if case .parameterEncodingFailed = self { return true } - return false - } - - /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties - /// will contain the associated values. - public var isMultipartEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, and `responseCode` properties will contain the associated values. - public var isResponseValidationError: Bool { - if case .responseValidationFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and - /// `underlyingError` properties will contain the associated values. - public var isResponseSerializationError: Bool { - if case .responseSerializationFailed = self { return true } - return false - } -} - -// MARK: - Convenience Properties - -extension AFError { - /// The `URLConvertible` associated with the error. - public var urlConvertible: URLConvertible? { - switch self { - case .invalidURL(let url): - return url - default: - return nil - } - } - - /// The `URL` associated with the error. - public var url: URL? { - switch self { - case .multipartEncodingFailed(let reason): - return reason.url - default: - return nil - } - } - - /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, - /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. - public var underlyingError: Error? { - switch self { - case .parameterEncodingFailed(let reason): - return reason.underlyingError - case .multipartEncodingFailed(let reason): - return reason.underlyingError - case .responseSerializationFailed(let reason): - return reason.underlyingError - default: - return nil - } - } - - /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. - public var acceptableContentTypes: [String]? { - switch self { - case .responseValidationFailed(let reason): - return reason.acceptableContentTypes - default: - return nil - } - } - - /// The response `Content-Type` of a `.responseValidationFailed` error. - public var responseContentType: String? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseContentType - default: - return nil - } - } - - /// The response code of a `.responseValidationFailed` error. - public var responseCode: Int? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseCode - default: - return nil - } - } - - /// The `String.Encoding` associated with a failed `.stringResponse()` call. - public var failedStringEncoding: String.Encoding? { - switch self { - case .responseSerializationFailed(let reason): - return reason.failedStringEncoding - default: - return nil - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var underlyingError: Error? { - switch self { - case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var url: URL? { - switch self { - case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), - .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), - .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), - .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), - .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): - return url - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), - .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.ResponseValidationFailureReason { - var acceptableContentTypes: [String]? { - switch self { - case .missingContentType(let types), .unacceptableContentType(let types, _): - return types - default: - return nil - } - } - - var responseContentType: String? { - switch self { - case .unacceptableContentType(_, let responseType): - return responseType - default: - return nil - } - } - - var responseCode: Int? { - switch self { - case .unacceptableStatusCode(let code): - return code - default: - return nil - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var failedStringEncoding: String.Encoding? { - switch self { - case .stringSerializationFailed(let encoding): - return encoding - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): - return error - default: - return nil - } - } -} - -// MARK: - Error Descriptions - -extension AFError: LocalizedError { - public var errorDescription: String? { - switch self { - case .invalidURL(let url): - return "URL is not valid: \(url)" - case .parameterEncodingFailed(let reason): - return reason.localizedDescription - case .multipartEncodingFailed(let reason): - return reason.localizedDescription - case .responseValidationFailed(let reason): - return reason.localizedDescription - case .responseSerializationFailed(let reason): - return reason.localizedDescription - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var localizedDescription: String { - switch self { - case .missingURL: - return "URL request to encode was missing a URL" - case .jsonEncodingFailed(let error): - return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case .propertyListEncodingFailed(let error): - return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var localizedDescription: String { - switch self { - case .bodyPartURLInvalid(let url): - return "The URL provided is not a file URL: \(url)" - case .bodyPartFilenameInvalid(let url): - return "The URL provided does not have a valid filename: \(url)" - case .bodyPartFileNotReachable(let url): - return "The URL provided is not reachable: \(url)" - case .bodyPartFileNotReachableWithError(let url, let error): - return ( - "The system returned an error while checking the provided URL for " + - "reachability.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartFileIsDirectory(let url): - return "The URL provided is a directory: \(url)" - case .bodyPartFileSizeNotAvailable(let url): - return "Could not fetch the file size from the provided URL: \(url)" - case .bodyPartFileSizeQueryFailedWithError(let url, let error): - return ( - "The system returned an error while attempting to fetch the file size from the " + - "provided URL.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartInputStreamCreationFailed(let url): - return "Failed to create an InputStream for the provided URL: \(url)" - case .outputStreamCreationFailed(let url): - return "Failed to create an OutputStream for URL: \(url)" - case .outputStreamFileAlreadyExists(let url): - return "A file already exists at the provided URL: \(url)" - case .outputStreamURLInvalid(let url): - return "The provided OutputStream URL is invalid: \(url)" - case .outputStreamWriteFailed(let error): - return "OutputStream write failed with error: \(error)" - case .inputStreamReadFailed(let error): - return "InputStream read failed with error: \(error)" - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var localizedDescription: String { - switch self { - case .inputDataNil: - return "Response could not be serialized, input data was nil." - case .inputDataNilOrZeroLength: - return "Response could not be serialized, input data was nil or zero length." - case .inputFileNil: - return "Response could not be serialized, input file was nil." - case .inputFileReadFailed(let url): - return "Response could not be serialized, input file could not be read: \(url)." - case .stringSerializationFailed(let encoding): - return "String could not be serialized with encoding: \(encoding)." - case .jsonSerializationFailed(let error): - return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case .propertyListSerializationFailed(let error): - return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.ResponseValidationFailureReason { - var localizedDescription: String { - switch self { - case .dataFileNil: - return "Response could not be validated, data file was nil." - case .dataFileReadFailed(let url): - return "Response could not be validated, data file could not be read: \(url)." - case .missingContentType(let types): - return ( - "Response Content-Type was missing and acceptable content types " + - "(\(types.joined(separator: ","))) do not match \"*/*\"." - ) - case .unacceptableContentType(let acceptableTypes, let responseType): - return ( - "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + - "\(acceptableTypes.joined(separator: ","))." - ) - case .unacceptableStatusCode(let code): - return "Response status code was unacceptable: \(code)." - } - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index 20c3672fbaf..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,465 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct -/// URL requests. -public protocol URLConvertible { - /// Returns a URL that conforms to RFC 2396 or throws an `Error`. - /// - /// - throws: An `Error` if the type cannot be converted to a `URL`. - /// - /// - returns: A URL or throws an `Error`. - func asURL() throws -> URL -} - -extension String: URLConvertible { - /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. - /// - /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } - return url - } -} - -extension URL: URLConvertible { - /// Returns self. - public func asURL() throws -> URL { return self } -} - -extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherwise throws an `Error`. - /// - /// - throws: An `AFError.invalidURL` if `url` is `nil`. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = url else { throw AFError.invalidURL(url: self) } - return url - } -} - -// MARK: - - -/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -public protocol URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - /// - /// - throws: An `Error` if the underlying `URLRequest` is `nil`. - /// - /// - returns: A URL request. - func asURLRequest() throws -> URLRequest -} - -extension URLRequestConvertible { - /// The URL request. - public var urlRequest: URLRequest? { return try? asURLRequest() } -} - -extension URLRequest: URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - public func asURLRequest() throws -> URLRequest { return self } -} - -// MARK: - - -extension URLRequest { - /// Creates an instance with the specified `method`, `urlString` and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The new `URLRequest` instance. - public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { - let url = try url.asURL() - - self.init(url: url) - - httpMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - setValue(headerValue, forHTTPHeaderField: headerField) - } - } - } - - func adapt(using adapter: RequestAdapter?) throws -> URLRequest { - guard let adapter = adapter else { return self } - return try adapter.adapt(self) - } -} - -// MARK: - Data Request - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding` and `headers`. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest -{ - return SessionManager.default.request( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest`. -/// -/// - parameter urlRequest: The URL request -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - return SessionManager.default.request(urlRequest) -} - -// MARK: - Download Request - -// MARK: URL Request - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - to: destination - ) -} - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter urlRequest: The URL request. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(urlRequest, to: destination) -} - -// MARK: Resume Data - -/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a -/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken -/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the -/// data is written incorrectly and will always fail to resume the download. For more information about the bug and -/// possible workarounds, please refer to the following Stack Overflow post: -/// -/// - http://stackoverflow.com/a/39347461/1342462 -/// -/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` -/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional -/// information. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(resumingWith: resumeData, to: destination) -} - -// MARK: - Upload Request - -// MARK: File - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) -} - -/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(fileURL, with: urlRequest) -} - -// MARK: Data - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(data, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(data, with: urlRequest) -} - -// MARK: InputStream - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `stream`. -/// -/// - parameter stream: The stream to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(stream, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `stream`. -/// -/// - parameter urlRequest: The URL request. -/// - parameter stream: The stream to upload. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(stream, with: urlRequest) -} - -// MARK: MultipartFormData - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls -/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - to: url, - method: method, - headers: headers, - encodingCompletion: encodingCompletion - ) -} - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and -/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter urlRequest: The URL request. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - encodingCompletion: encodingCompletion - ) -} - -#if !os(watchOS) - -// MARK: - Stream Request - -// MARK: Hostname and Port - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` -/// and `port`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter hostName: The hostname of the server to connect to. -/// - parameter port: The port of the server to connect to. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return SessionManager.default.stream(withHostName: hostName, port: port) -} - -// MARK: NetService - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter netService: The net service used to identify the endpoint. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(with netService: NetService) -> StreamRequest { - return SessionManager.default.stream(with: netService) -} - -#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift deleted file mode 100644 index a54673cca61..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DispatchQueue+Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Dispatch -import Foundation - -extension DispatchQueue { - static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } - static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } - static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } - static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } - - func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { - asyncAfter(deadline: .now() + delay, execute: closure) - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index b840138ccc1..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,580 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(macOS) -import CoreServices -#endif - -/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode -/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead -/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the -/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for -/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -/// -/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well -/// and the w3 form documentation. -/// -/// - https://www.ietf.org/rfc/rfc2388.txt -/// - https://www.ietf.org/rfc/rfc2045.txt -/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -open class MultipartFormData { - - // MARK: - Helper Types - - struct EncodingCharacters { - static let crlf = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case initial, encapsulated, final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { - let boundaryText: String - - switch boundaryType { - case .initial: - boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" - case .encapsulated: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" - case .final: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" - } - - return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - } - - class BodyPart { - let headers: HTTPHeaders - let bodyStream: InputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public var boundary: String - - private var bodyParts: [BodyPart] - private var bodyPartError: AFError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /// Creates a multipart form data object. - /// - /// - returns: The multipart form data object. - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /// - /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - /// information, please refer to the following article: - /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - /// - - self.streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - public func append(_ data: Data, withName name: String) { - let headers = contentHeaders(withName: name) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, mimeType: String) { - let headers = contentHeaders(withName: name, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - /// system associated MIME type. - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - public func append(_ fileURL: URL, withName name: String) { - let fileName = fileURL.lastPathComponent - let pathExtension = fileURL.pathExtension - - if !fileName.isEmpty && !pathExtension.isEmpty { - let mime = mimeType(forPathExtension: pathExtension) - append(fileURL, withName: name, fileName: fileName, mimeType: mime) - } else { - setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) - } - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - /// - Content-Type: #{mimeType} (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.isFileURL else { - setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - do { - let isReachable = try fileURL.checkPromisedItemIsReachable() - guard isReachable else { - setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) - return - } - } catch { - setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - let path = fileURL.path - - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - let bodyContentLength: UInt64 - - do { - guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { - setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) - return - } - - bodyContentLength = fileSize.uint64Value - } - catch { - setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = InputStream(url: fileURL) else { - setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) - return - } - - append(stream, withLength: bodyContentLength, headers: headers) - } - - /// Creates a body part from the stream and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append( - _ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) - { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - HTTP headers - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter headers: The HTTP headers for the body part. - public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /// Encodes all the appended body parts into a single `Data` value. - /// - /// It is important to note that this method will load all the appended body parts into memory all at the same - /// time. This method should only be used when the encoded data will have a small memory footprint. For large data - /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - /// - /// - throws: An `AFError` if encoding encounters an error. - /// - /// - returns: The encoded `Data` if encoding is successful. - public func encode() throws -> Data { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - var encoded = Data() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encode(bodyPart) - encoded.append(encodedData) - } - - return encoded - } - - /// Writes the appended body parts into the given file URL. - /// - /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, - /// this approach is very memory efficient and should be used for large body part data. - /// - /// - parameter fileURL: The file URL to write the multipart form data into. - /// - /// - throws: An `AFError` if encoding encounters an error. - public func writeEncodedData(to fileURL: URL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if FileManager.default.fileExists(atPath: fileURL.path) { - throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) - } else if !fileURL.isFileURL { - throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) - } - - guard let outputStream = OutputStream(url: fileURL, append: false) else { - throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) - } - - outputStream.open() - defer { outputStream.close() } - - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true - - for bodyPart in self.bodyParts { - try write(bodyPart, to: outputStream) - } - } - - // MARK: - Private - Body Part Encoding - - private func encode(_ bodyPart: BodyPart) throws -> Data { - var encoded = Data() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.append(initialData) - - let headerData = encodeHeaders(for: bodyPart) - encoded.append(headerData) - - let bodyStreamData = try encodeBodyStream(for: bodyPart) - encoded.append(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.append(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaders(for bodyPart: BodyPart) -> Data { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.crlf)" - } - headerText += EncodingCharacters.crlf - - return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - - private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { - let inputStream = bodyPart.bodyStream - inputStream.open() - defer { inputStream.close() } - - var encoded = Data() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let error = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - if bytesRead > 0 { - encoded.append(buffer, count: bytesRead) - } else { - break - } - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { - try writeInitialBoundaryData(for: bodyPart, to: outputStream) - try writeHeaderData(for: bodyPart, to: outputStream) - try writeBodyStream(for: bodyPart, to: outputStream) - try writeFinalBoundaryData(for: bodyPart, to: outputStream) - } - - private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try write(initialData, to: outputStream) - } - - private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let headerData = encodeHeaders(for: bodyPart) - return try write(headerData, to: outputStream) - } - - private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let inputStream = bodyPart.bodyStream - - inputStream.open() - defer { inputStream.close() } - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let error = outputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if - let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { - var disposition = "form-data; name=\"\(name)\"" - if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - - var headers = ["Content-Disposition": disposition] - if let mimeType = mimeType { headers["Content-Type"] = mimeType } - - return headers - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { - guard bodyPartError == nil else { return } - bodyPartError = AFError.multipartEncodingFailed(reason: reason) - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index 398ca827c2b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,238 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if !os(watchOS) - -import Foundation -import SystemConfiguration - -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and -/// WiFi network interfaces. -/// -/// Reachability can be used to determine background information about why a network operation failed, or to retry -/// network requests when a connection is established. It should not be used to prevent a user from initiating a network -/// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /// Defines the various states of network reachability. - /// - /// - unknown: It is unknown whether the network is reachable. - /// - notReachable: The network is not reachable. - /// - reachable: The network is reachable. - public enum NetworkReachabilityStatus { - case unknown - case notReachable - case reachable(ConnectionType) - } - - /// Defines the various connection types detected by reachability flags. - /// - /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. - /// - wwan: The connection type is a WWAN connection. - public enum ConnectionType { - case ethernetOrWiFi - case wwan - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = (NetworkReachabilityStatus) -> Void - - // MARK: - Properties - - /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } - - /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .unknown } - return networkReachabilityStatusForFlags(flags) - } - - /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main - - /// A closure executed when the network reachability status changes. - open var listener: Listener? - - open var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - if SCNetworkReachabilityGetFlags(reachability, &flags) { - return flags - } - - return nil - } - - private let reachability: SCNetworkReachability - open var previousFlags: SCNetworkReachabilityFlags - - // MARK: - Initialization - - /// Creates a `NetworkReachabilityManager` instance with the specified host. - /// - /// - parameter host: The host used to evaluate network reachability. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - self.init(reachability: reachability) - } - - /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. - /// - /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - /// status of the device, both IPv4 and IPv6. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?() { - var address = sockaddr_in() - address.sin_len = UInt8(MemoryLayout.size) - address.sin_family = sa_family_t(AF_INET) - - guard let reachability = withUnsafePointer(to: &address, { pointer in - return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { - return SCNetworkReachabilityCreateWithAddress(nil, $0) - } - }) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - - // Set the previous flags to an unreserved value to represent unknown status - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /// Starts listening for changes in network reachability status. - /// - /// - returns: `true` if listening was started successfully, `false` otherwise. - @discardableResult - open func startListening() -> Bool { - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = Unmanaged.passUnretained(self).toOpaque() - - let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() - reachability.notifyListener(flags) - }, - &context - ) - - let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - - listenerQueue.async { - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - - guard let flags = self.flags else { return } - - self.notifyListener(flags) - } - - return callbackEnabled && queueEnabled - } - - /// Stops listening for changes in network reachability status. - open func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - } - - // MARK: - Internal - Listener Notification - - func notifyListener(_ flags: SCNetworkReachabilityFlags) { - guard previousFlags != flags else { return } - previousFlags = flags - - listener?(networkReachabilityStatusForFlags(flags)) - } - - // MARK: - Internal - Network Reachability Status - - func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard isNetworkReachable(with: flags) else { return .notReachable } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif - - return networkStatus - } - - func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { - let isReachable = flags.contains(.reachable) - let needsConnection = flags.contains(.connectionRequired) - let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) - let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - - return isReachable && (!needsConnection || canConnectWithoutUserInteraction) - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -/// Returns whether the two network reachability status values are equal. -/// -/// - parameter lhs: The left-hand side value to compare. -/// - parameter rhs: The right-hand side value to compare. -/// -/// - returns: `true` if the two values are equal, `false` otherwise. -public func ==( - lhs: NetworkReachabilityManager.NetworkReachabilityStatus, - rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ - switch (lhs, rhs) { - case (.unknown, .unknown): - return true - case (.notReachable, .notReachable): - return true - case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): - return lhsConnectionType == rhsConnectionType - default: - return false - } -} - -#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index e1ac31bf327..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Notification.Name { - /// Used as a namespace for all `URLSessionTask` related notifications. - public struct Task { - /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. - public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") - - /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. - public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") - - /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. - public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") - - /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. - public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") - } -} - -// MARK: - - -extension Notification { - /// Used as a namespace for all `Notification` user info dictionary keys. - public struct Key { - /// User info dictionary key representing the `URLSessionTask` associated with the notification. - public static let Task = "org.alamofire.notification.key.task" - - /// User info dictionary key representing the responseData associated with the notification. - public static let ResponseData = "org.alamofire.notification.key.responseData" - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index 6195809c5db..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,483 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// HTTP method definitions. -/// -/// See https://tools.ietf.org/html/rfc7231#section-4.3 -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -// MARK: - - -/// A dictionary of parameters to apply to a `URLRequest`. -public typealias Parameters = [String: Any] - -/// A type used to define how a set of parameters are applied to a `URLRequest`. -public protocol ParameterEncoding { - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. - /// - /// - returns: The encoded request. - func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest -} - -// MARK: - - -/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP -/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as -/// the HTTP body depends on the destination of the encoding. -/// -/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// There is no published specification for how to encode collection types. By default the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -public struct URLEncoding: ParameterEncoding { - - // MARK: Helper Types - - /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the - /// resulting URL request. - /// - /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` - /// requests and sets as the HTTP body for requests with any other HTTP method. - /// - queryString: Sets or appends encoded query string result to existing query string. - /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. - public enum Destination { - case methodDependent, queryString, httpBody - } - - /// Configures how `Array` parameters are encoded. - /// - /// - brackets: An empty set of square brackets is appended to the key for every value. - /// This is the default behavior. - /// - noBrackets: No brackets are appended. The key is encoded as is. - public enum ArrayEncoding { - case brackets, noBrackets - - func encode(key: String) -> String { - switch self { - case .brackets: - return "\(key)[]" - case .noBrackets: - return key - } - } - } - - /// Configures how `Bool` parameters are encoded. - /// - /// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior. - /// - literal: Encode `true` and `false` as string literals. - public enum BoolEncoding { - case numeric, literal - - func encode(value: Bool) -> String { - switch self { - case .numeric: - return value ? "1" : "0" - case .literal: - return value ? "true" : "false" - } - } - } - - // MARK: Properties - - /// Returns a default `URLEncoding` instance. - public static var `default`: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.methodDependent` destination. - public static var methodDependent: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.queryString` destination. - public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - - /// Returns a `URLEncoding` instance with an `.httpBody` destination. - public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - - /// The destination defining where the encoded query string is to be applied to the URL request. - public let destination: Destination - - /// The encoding to use for `Array` parameters. - public let arrayEncoding: ArrayEncoding - - /// The encoding to use for `Bool` parameters. - public let boolEncoding: BoolEncoding - - // MARK: Initialization - - /// Creates a `URLEncoding` instance using the specified destination. - /// - /// - parameter destination: The destination defining where the encoded query string is to be applied. - /// - parameter arrayEncoding: The encoding to use for `Array` parameters. - /// - parameter boolEncoding: The encoding to use for `Bool` parameters. - /// - /// - returns: The new `URLEncoding` instance. - public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) { - self.destination = destination - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { - guard let url = urlRequest.url else { - throw AFError.parameterEncodingFailed(reason: .missingURL) - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - urlComponents.percentEncodedQuery = percentEncodedQuery - urlRequest.url = urlComponents.url - } - } else { - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) - } - - return urlRequest - } - - /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - /// - /// - parameter key: The key of the query component. - /// - parameter value: The value of the query component. - /// - /// - returns: The percent-escaped, URL encoded query string components. - public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: Any] { - for (nestedKey, value) in dictionary { - components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) - } - } else if let array = value as? [Any] { - for value in array { - components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) - } - } else if let value = value as? NSNumber { - if value.isBool { - components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - } else if let bool = value as? Bool { - components.append((escape(key), escape(boolEncoding.encode(value: bool)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /// Returns a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - /// should be percent-escaped in the query string. - /// - /// - parameter string: The string to be percent-escaped. - /// - /// - returns: The percent-escaped string. - public func escape(_ string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - var allowedCharacterSet = CharacterSet.urlQueryAllowed - allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, *) { - escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex - let range = startIndex.. String { - var components: [(String, String)] = [] - - for key in parameters.keys.sorted(by: <) { - let value = parameters[key]! - components += queryComponents(fromKey: key, value: value) - } - return components.map { "\($0)=\($1)" }.joined(separator: "&") - } - - private func encodesParametersInURL(with method: HTTPMethod) -> Bool { - switch destination { - case .queryString: - return true - case .httpBody: - return false - default: - break - } - - switch method { - case .get, .head, .delete: - return true - default: - return false - } - } -} - -// MARK: - - -/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the -/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -public struct JSONEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a `JSONEncoding` instance with default writing options. - public static var `default`: JSONEncoding { return JSONEncoding() } - - /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. - public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } - - /// The options for writing the parameters as JSON data. - public let options: JSONSerialization.WritingOptions - - // MARK: Initialization - - /// Creates a `JSONEncoding` instance using the specified options. - /// - /// - parameter options: The options for writing the parameters as JSON data. - /// - /// - returns: The new `JSONEncoding` instance. - public init(options: JSONSerialization.WritingOptions = []) { - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: parameters, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } - - /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. - /// - /// - parameter urlRequest: The request to apply the JSON object to. - /// - parameter jsonObject: The JSON object to apply to the request. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonObject = jsonObject else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the -/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header -/// field of an encoded request is set to `application/x-plist`. -public struct PropertyListEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a default `PropertyListEncoding` instance. - public static var `default`: PropertyListEncoding { return PropertyListEncoding() } - - /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. - public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } - - /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. - public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } - - /// The property list serialization format. - public let format: PropertyListSerialization.PropertyListFormat - - /// The options for writing the parameters as plist data. - public let options: PropertyListSerialization.WriteOptions - - // MARK: Initialization - - /// Creates a `PropertyListEncoding` instance using the specified format and options. - /// - /// - parameter format: The property list serialization format. - /// - parameter options: The options for writing the parameters as plist data. - /// - /// - returns: The new `PropertyListEncoding` instance. - public init( - format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { - self.format = format - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try PropertyListSerialization.data( - fromPropertyList: parameters, - format: format, - options: options - ) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -extension NSNumber { - fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index 2be2ce0106f..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,660 +0,0 @@ -// -// Request.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. -public protocol RequestAdapter { - /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. - /// - /// - parameter urlRequest: The URL request to adapt. - /// - /// - throws: An `Error` if the adaptation encounters an error. - /// - /// - returns: The adapted `URLRequest`. - func adapt(_ urlRequest: URLRequest) throws -> URLRequest -} - -// MARK: - - -/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. -public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void - -/// A type that determines whether a request should be retried after being executed by the specified session manager -/// and encountering an error. -public protocol RequestRetrier { - /// Determines whether the `Request` should be retried by calling the `completion` closure. - /// - /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs - /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly - /// cleaned up after. - /// - /// - parameter manager: The session manager the request was executed on. - /// - parameter request: The request that failed due to the encountered error. - /// - parameter error: The error encountered when executing the request. - /// - parameter completion: The completion closure to be executed when retry decision has been determined. - func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) -} - -// MARK: - - -protocol TaskConvertible { - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask -} - -/// A dictionary of headers to apply to a `URLRequest`. -public typealias HTTPHeaders = [String: String] - -// MARK: - - -/// Responsible for sending a request and receiving the response and associated data from the server, as well as -/// managing its underlying `URLSessionTask`. -open class Request { - - // MARK: Helper Types - - /// A closure executed when monitoring upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void - - enum RequestTask { - case data(TaskConvertible?, URLSessionTask?) - case download(TaskConvertible?, URLSessionTask?) - case upload(TaskConvertible?, URLSessionTask?) - case stream(TaskConvertible?, URLSessionTask?) - } - - // MARK: Properties - - /// The delegate for the underlying task. - open internal(set) var delegate: TaskDelegate { - get { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - return taskDelegate - } - set { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - taskDelegate = newValue - } - } - - /// The underlying task. - open var task: URLSessionTask? { return delegate.task } - - /// The session belonging to the underlying task. - public let session: URLSession - - /// The request sent or to be sent to the server. - open var request: URLRequest? { return task?.originalRequest } - - /// The response received from the server, if any. - open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } - - /// The number of times the request has been retried. - open internal(set) var retryCount: UInt = 0 - - let originalTask: TaskConvertible? - - var startTime: CFAbsoluteTime? - var endTime: CFAbsoluteTime? - - var validations: [() -> Void] = [] - - private var taskDelegate: TaskDelegate - private var taskDelegateLock = NSLock() - - // MARK: Lifecycle - - init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { - self.session = session - - switch requestTask { - case .data(let originalTask, let task): - taskDelegate = DataTaskDelegate(task: task) - self.originalTask = originalTask - case .download(let originalTask, let task): - taskDelegate = DownloadTaskDelegate(task: task) - self.originalTask = originalTask - case .upload(let originalTask, let task): - taskDelegate = UploadTaskDelegate(task: task) - self.originalTask = originalTask - case .stream(let originalTask, let task): - taskDelegate = TaskDelegate(task: task) - self.originalTask = originalTask - } - - delegate.error = error - delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } - } - - // MARK: Authentication - - /// Associates an HTTP Basic credential with the request. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - parameter persistence: The URL credential persistence. `.ForSession` by default. - /// - /// - returns: The request. - @discardableResult - open func authenticate( - user: String, - password: String, - persistence: URLCredential.Persistence = .forSession) - -> Self - { - let credential = URLCredential(user: user, password: password, persistence: persistence) - return authenticate(usingCredential: credential) - } - - /// Associates a specified credential with the request. - /// - /// - parameter credential: The credential. - /// - /// - returns: The request. - @discardableResult - open func authenticate(usingCredential credential: URLCredential) -> Self { - delegate.credential = credential - return self - } - - /// Returns a base64 encoded basic authentication credential as an authorization header tuple. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. - open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { - guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } - - let credential = data.base64EncodedString(options: []) - - return (key: "Authorization", value: "Basic \(credential)") - } - - // MARK: State - - /// Resumes the request. - open func resume() { - guard let task = task else { delegate.queue.isSuspended = false ; return } - - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - task.resume() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidResume, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Suspends the request. - open func suspend() { - guard let task = task else { return } - - task.suspend() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidSuspend, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Cancels the request. - open func cancel() { - guard let task = task else { return } - - task.cancel() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } -} - -// MARK: - CustomStringConvertible - -extension Request: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as - /// well as the response status code if a response has been received. - open var description: String { - var components: [String] = [] - - if let HTTPMethod = request?.httpMethod { - components.append(HTTPMethod) - } - - if let urlString = request?.url?.absoluteString { - components.append(urlString) - } - - if let response = response { - components.append("(\(response.statusCode))") - } - - return components.joined(separator: " ") - } -} - -// MARK: - CustomDebugStringConvertible - -extension Request: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, in the form of a cURL command. - open var debugDescription: String { - return cURLRepresentation() - } - - func cURLRepresentation() -> String { - var components = ["$ curl -v"] - - guard let request = self.request, - let url = request.url, - let host = url.host - else { - return "$ curl command could not be created" - } - - if let httpMethod = request.httpMethod, httpMethod != "GET" { - components.append("-X \(httpMethod)") - } - - if let credentialStorage = self.session.configuration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace( - host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) - - if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { - for credential in credentials { - guard let user = credential.user, let password = credential.password else { continue } - components.append("-u \(user):\(password)") - } - } else { - if let credential = delegate.credential, let user = credential.user, let password = credential.password { - components.append("-u \(user):\(password)") - } - } - } - - if session.configuration.httpShouldSetCookies { - if - let cookieStorage = session.configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } - - #if swift(>=3.2) - components.append("-b \"\(string[.. URLSessionTask { - do { - let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.sync { session.dataTask(with: urlRequest) } - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - if let requestable = originalTask as? Requestable { return requestable.urlRequest } - - return nil - } - - /// The progress of fetching the response data from the server for the request. - open var progress: Progress { return dataDelegate.progress } - - var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } - - // MARK: Stream - - /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. - /// - /// This closure returns the bytes most recently received from the server, not including data from previous calls. - /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - /// also important to note that the server data in any `Response` object will be `nil`. - /// - /// - parameter closure: The code to be executed periodically during the lifecycle of the request. - /// - /// - returns: The request. - @discardableResult - open func stream(closure: ((Data) -> Void)? = nil) -> Self { - dataDelegate.dataStream = closure - return self - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - dataDelegate.progressHandler = (closure, queue) - return self - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. -open class DownloadRequest: Request { - - // MARK: Helper Types - - /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the - /// destination URL. - public struct DownloadOptions: OptionSet { - /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. - public let rawValue: UInt - - /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. - public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - - /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. - public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - - /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. - /// - /// - parameter rawValue: The raw bitmask value for the option. - /// - /// - returns: A new log level instance. - public init(rawValue: UInt) { - self.rawValue = rawValue - } - } - - /// A closure executed once a download request has successfully completed in order to determine where to move the - /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL - /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and - /// the options defining how the file should be moved. - public typealias DownloadFileDestination = ( - _ temporaryURL: URL, - _ response: HTTPURLResponse) - -> (destinationURL: URL, options: DownloadOptions) - - enum Downloadable: TaskConvertible { - case request(URLRequest) - case resumeData(Data) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .request(urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.downloadTask(with: urlRequest) } - case let .resumeData(resumeData): - task = queue.sync { session.downloadTask(withResumeData: resumeData) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { - return urlRequest - } - - return nil - } - - /// The resume data of the underlying download task if available after a failure. - open var resumeData: Data? { return downloadDelegate.resumeData } - - /// The progress of downloading the response data from the server for the request. - open var progress: Progress { return downloadDelegate.progress } - - var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } - - // MARK: State - - /// Cancels the request. - override open func cancel() { - cancel(createResumeData: true) - } - - /// Cancels the request. - /// - /// - parameter createResumeData: Determines whether resume data is created via the underlying download task or not. - open func cancel(createResumeData: Bool) { - if createResumeData { - downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } - } else { - downloadDelegate.downloadTask.cancel() - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task as Any] - ) - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - downloadDelegate.progressHandler = (closure, queue) - return self - } - - // MARK: Destination - - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. - /// - /// - parameter directory: The search path directory. `.DocumentDirectory` by default. - /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. - /// - /// - returns: A download file destination closure. - open class func suggestedDownloadDestination( - for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) - - if !directoryURLs.isEmpty { - return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) - } - - return (temporaryURL, []) - } - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. -open class UploadRequest: DataRequest { - - // MARK: Helper Types - - enum Uploadable: TaskConvertible { - case data(Data, URLRequest) - case file(URL, URLRequest) - case stream(InputStream, URLRequest) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .data(data, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, from: data) } - case let .file(url, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } - case let .stream(_, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - guard let uploadable = originalTask as? Uploadable else { return nil } - - switch uploadable { - case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): - return urlRequest - } - } - - /// The progress of uploading the payload to the server for the upload request. - open var uploadProgress: Progress { return uploadDelegate.uploadProgress } - - var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } - - // MARK: Upload Progress - - /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to - /// the server. - /// - /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress - /// of data being read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is sent to the server. - /// - /// - returns: The request. - @discardableResult - open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - uploadDelegate.uploadProgressHandler = (closure, queue) - return self - } -} - -// MARK: - - -#if !os(watchOS) - -/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -open class StreamRequest: Request { - enum Streamable: TaskConvertible { - case stream(hostName: String, port: Int) - case netService(NetService) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask - - switch self { - case let .stream(hostName, port): - task = queue.sync { session.streamTask(withHostName: hostName, port: port) } - case let .netService(netService): - task = queue.sync { session.streamTask(with: netService) } - } - - return task - } - } -} - -#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 747a471a55b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,567 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to store all data associated with an non-serialized response of a data or upload request. -public struct DefaultDataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDataResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - data: The data returned by the server. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.data = data - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a data or upload request. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter data: The data returned by the server. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DataResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.data = data - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data, the response serialization result and the timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DataResponse { - /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result - /// value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's - /// result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -/// Used to store all data associated with an non-serialized response of a download request. -public struct DefaultDownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDownloadResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - temporaryURL: The temporary destination URL of the data returned from the server. - /// - destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - resumeData: The resume data generated if the request was cancelled. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. - /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - parameter resumeData: The resume data generated if the request was cancelled. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DownloadResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the response serialization result and the - /// timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") - output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") - output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DownloadResponse { - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this - /// instance's result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -protocol Response { - /// The task metrics containing the request / response statistics. - var _metrics: AnyObject? { get set } - mutating func add(_ metrics: AnyObject?) -} - -extension Response { - mutating func add(_ metrics: AnyObject?) { - #if !os(watchOS) - guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } - guard let metrics = metrics as? URLSessionTaskMetrics else { return } - - _metrics = metrics - #endif - } -} - -// MARK: - - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 9cc105a8205..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,715 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The type in which all data response serializers must conform to in order to serialize a response. -public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DataResponseSerializer: DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - - -/// The type in which all download response serializers must conform to in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - Timeline - -extension Request { - var timeline: Timeline { - let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - return Timeline( - requestStartTime: requestStartTime, - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - } -} - -// MARK: - Default - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var dataResponse = DefaultDataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - error: self.delegate.error, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - completionHandler(dataResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - var dataResponse = DataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } - } - - return self - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var downloadResponse = DefaultDownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - error: self.downloadDelegate.error, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - completionHandler(downloadResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data contained in the destination url. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.downloadDelegate.fileURL, - self.downloadDelegate.error - ) - - var downloadResponse = DownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - result: result, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } - } - - return self - } -} - -// MARK: - Data - -extension Request { - /// Returns a result data type that contains the response data as-is. - /// - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - return .success(validData) - } -} - -extension DataRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseData(response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseData(response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -// MARK: - String - -extension Request { - /// Returns a result string type initialized from the response data with the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseString( - encoding: String.Encoding?, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName)) - ) - } - - let actualEncoding = convertedEncoding ?? .isoLatin1 - - if let string = String(data: validData, encoding: actualEncoding) { - return .success(string) - } else { - return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -// MARK: - JSON - -extension Request { - /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` - /// with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseJSON( - options: JSONSerialization.ReadingOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let json = try JSONSerialization.jsonObject(with: validData, options: options) - return .success(json) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -// MARK: - Property List - -extension Request { - /// Returns a plist object contained in a result type constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponsePropertyList( - options: PropertyListSerialization.ReadOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) - return .success(plist) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -/// A set of HTTP response status code that do not contain response data. -private let emptyDataStatusCodes: Set = [204, 205] diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index e0928089ab7..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,300 +0,0 @@ -// -// Result.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to represent whether a request was successful or encountered an error. -/// -/// - success: The request and all post processing operations were successful resulting in the serialization of the -/// provided associated value. -/// -/// - failure: The request encountered an error resulting in a failure. The associated values are the original data -/// provided by the server as well as the error that caused the failure. -public enum Result { - case success(Value) - case failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .success: - return true - case .failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .success(let value): - return value - case .failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .success: - return nil - case .failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .success: - return "SUCCESS" - case .failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .success(let value): - return "SUCCESS: \(value)" - case .failure(let error): - return "FAILURE: \(error)" - } - } -} - -// MARK: - Functional APIs - -extension Result { - /// Creates a `Result` instance from the result of a closure. - /// - /// A failure result is created when the closure throws, and a success result is created when the closure - /// succeeds without throwing an error. - /// - /// func someString() throws -> String { ... } - /// - /// let result = Result(value: { - /// return try someString() - /// }) - /// - /// // The type of result is Result - /// - /// The trailing closure syntax is also supported: - /// - /// let result = Result { try someString() } - /// - /// - parameter value: The closure to execute and create the result for. - public init(value: () throws -> Value) { - do { - self = try .success(value()) - } catch { - self = .failure(error) - } - } - - /// Returns the success value, or throws the failure error. - /// - /// let possibleString: Result = .success("success") - /// try print(possibleString.unwrap()) - /// // Prints "success" - /// - /// let noString: Result = .failure(error) - /// try print(noString.unwrap()) - /// // Throws error - public func unwrap() throws -> Value { - switch self { - case .success(let value): - return value - case .failure(let error): - throw error - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: Result = .success(Data()) - /// let possibleInt = possibleData.map { $0.count } - /// try print(possibleInt.unwrap()) - /// // Prints "0" - /// - /// let noData: Result = .failure(error) - /// let noInt = noData.map { $0.count } - /// try print(noInt.unwrap()) - /// // Throws error - /// - /// - parameter transform: A closure that takes the success value of the `Result` instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func map(_ transform: (Value) -> T) -> Result { - switch self { - case .success(let value): - return .success(transform(value)) - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func flatMap(_ transform: (Value) throws -> T) -> Result { - switch self { - case .success(let value): - do { - return try .success(transform(value)) - } catch { - return .failure(error) - } - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: Result = .failure(someError) - /// let withMyError: Result = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func mapError(_ transform: (Error) -> T) -> Result { - switch self { - case .failure(let error): - return .failure(transform(error)) - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func flatMapError(_ transform: (Error) throws -> T) -> Result { - switch self { - case .failure(let error): - do { - return try .failure(transform(error)) - } catch { - return .failure(error) - } - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withValue(_ closure: (Value) throws -> Void) rethrows -> Result { - if case let .success(value) = self { try closure(value) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withError(_ closure: (Error) throws -> Void) rethrows -> Result { - if case let .failure(error) = self { try closure(error) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a success. - /// - /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifSuccess(_ closure: () throws -> Void) rethrows -> Result { - if isSuccess { try closure() } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure. - /// - /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifFailure(_ closure: () throws -> Void) rethrows -> Result { - if isFailure { try closure() } - - return self - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index dea099e257a..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,307 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -open class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /// Initializes the `ServerTrustPolicyManager` instance with the given policies. - /// - /// Since different servers and web services can have different leaf certificates, intermediate and even root - /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - /// pinning for host3 and disabling evaluation for host4. - /// - /// - parameter policies: A dictionary of all policies mapped to a particular host. - /// - /// - returns: The new `ServerTrustPolicyManager` instance. - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /// Returns the `ServerTrustPolicy` for the given host if applicable. - /// - /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override - /// this method and implement more complex mapping implementations such as wildcards. - /// - /// - parameter host: The host to use when searching for a matching policy. - /// - /// - returns: The server trust policy for the given host if found. - open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension URLSession { - private struct AssociatedKeys { - static var managerKey = "URLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when -/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust -/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. -/// -/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other -/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged -/// to route all communication over an HTTPS connection with pinning enabled. -/// -/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to -/// validate the host provided by the challenge. Applications are encouraged to always -/// validate the host in production environments to guarantee the validity of the server's -/// certificate chain. -/// -/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to -/// validate the host provided by the challenge as well as specify the revocation flags for -/// testing for revoked certificates. Apple platforms did not start testing for revoked -/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is -/// demonstrated in our TLS tests. Applications are encouraged to always validate the host -/// in production environments to guarantee the validity of the server's certificate chain. -/// -/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is -/// considered valid if one of the pinned certificates match one of the server certificates. -/// By validating both the certificate chain and host, certificate pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered -/// valid if one of the pinned public keys match one of the server certificate public keys. -/// By validating both the certificate chain and host, public key pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. -public enum ServerTrustPolicy { - case performDefaultEvaluation(validateHost: Bool) - case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) - case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case disableEvaluation - case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) - - // MARK: - Bundle Location - - /// Returns all certificates within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `.cer` files. - /// - /// - returns: All certificates within the given bundle. - public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) - }.joined()) - - for path in paths { - if - let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, - let certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /// Returns all public keys within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `*.cer` files. - /// - /// - returns: All public keys within the given bundle. - public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificates(in: bundle) { - if let publicKey = publicKey(for: certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /// Evaluates whether the server trust is valid for the given host. - /// - /// - parameter serverTrust: The server trust to evaluate. - /// - parameter host: The host of the challenge protection space. - /// - /// - returns: Whether the server trust is valid. - public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .performDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .performRevokedEvaluation(validateHost, revocationFlags): - let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) - SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateData(for: serverTrust) - let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData == pinnedCertificateData { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .disableEvaluation: - serverTrustIsValid = true - case let .customEvaluation(closure): - serverTrustIsValid = closure(serverTrust, host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(_ trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType.invalid - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType.unspecified - let proceed = SecTrustResultType.proceed - - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateData(for trust: SecTrust) -> [Data] { - var certificates: [SecCertificate] = [] - - for index in 0.. [Data] { - return certificates.map { SecCertificateCopyData($0) as Data } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeys(for trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust, trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift deleted file mode 100644 index 4964f1eebfd..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ /dev/null @@ -1,725 +0,0 @@ -// -// SessionDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for handling all delegate callbacks for the underlying session. -open class SessionDelegate: NSObject { - - // MARK: URLSessionDelegate Overrides - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. - open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. - open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. - open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? - - // MARK: URLSessionTaskDelegate Overrides - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. - open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. - open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. - open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and - /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. - open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. - open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? - - // MARK: URLSessionDataDelegate Overrides - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. - open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. - open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. - open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. - open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? - - // MARK: URLSessionDownloadDelegate Overrides - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. - open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. - open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. - open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: URLSessionStreamDelegate Overrides - -#if !os(watchOS) - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - -#endif - - // MARK: Properties - - var retrier: RequestRetrier? - weak var sessionManager: SessionManager? - - var requests: [Int: Request] = [:] - private let lock = NSLock() - - /// Access the task delegate for the specified task in a thread-safe manner. - open subscript(task: URLSessionTask) -> Request? { - get { - lock.lock() ; defer { lock.unlock() } - return requests[task.taskIdentifier] - } - set { - lock.lock() ; defer { lock.unlock() } - requests[task.taskIdentifier] = newValue - } - } - - // MARK: Lifecycle - - /// Initializes the `SessionDelegate` instance. - /// - /// - returns: The new `SessionDelegate` instance. - public override init() { - super.init() - } - - // MARK: NSObject Overrides - - /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond - /// to a specified message. - /// - /// - parameter selector: A selector that identifies a message. - /// - /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. - open override func responds(to selector: Selector) -> Bool { - #if !os(macOS) - if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil - } - #endif - - #if !os(watchOS) - if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { - switch selector { - case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): - return streamTaskReadClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): - return streamTaskWriteClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): - return streamTaskBetterRouteDiscovered != nil - case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): - return streamTaskDidBecomeInputAndOutputStreams != nil - default: - break - } - } - #endif - - switch selector { - case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return type(of: self).instancesRespond(to: selector) - } - } -} - -// MARK: - URLSessionDelegate - -extension SessionDelegate: URLSessionDelegate { - /// Tells the delegate that the session has been invalidated. - /// - /// - parameter session: The session object that was invalidated. - /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /// Requests credentials from the delegate in response to a session-level authentication request from the - /// remote server. - /// - /// - parameter session: The session containing the task that requested authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return - } - - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - -#if !os(macOS) - - /// Tells the delegate that all messages enqueued for a session have been delivered. - /// - /// - parameter session: The session that no longer has any outstanding requests. - open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - -#endif -} - -// MARK: - URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Tells the delegate that the remote server requested an HTTP redirect. - /// - /// - parameter session: The session containing the task whose request resulted in a redirect. - /// - parameter task: The task whose request resulted in a redirect. - /// - parameter response: An object containing the server’s response to the original request. - /// - parameter request: A URL request object filled out with the new location. - /// - parameter completionHandler: A closure that your handler should call with either the value of the request - /// parameter, a modified URL request object, or NULL to refuse the redirect and - /// return the body of the redirect response. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /// Requests credentials from the delegate in response to an authentication request from the remote server. - /// - /// - parameter session: The session containing the task whose request requires authentication. - /// - parameter task: The task whose request requires authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task]?.delegate { - delegate.urlSession( - session, - task: task, - didReceive: challenge, - completionHandler: completionHandler - ) - } else { - urlSession(session, didReceive: challenge, completionHandler: completionHandler) - } - } - - /// Tells the delegate when a task requires a new request body stream to send to the remote server. - /// - /// - parameter session: The session containing the task that needs a new body stream. - /// - parameter task: The task that needs a new body stream. - /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task]?.delegate { - delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /// Periodically informs the delegate of the progress of sending body content to the server. - /// - /// - parameter session: The session containing the data task. - /// - parameter task: The data task. - /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - /// - parameter totalBytesSent: The total number of bytes sent so far. - /// - parameter totalBytesExpectedToSend: The expected length of the body data. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - -#if !os(watchOS) - - /// Tells the delegate that the session finished collecting metrics for the task. - /// - /// - parameter session: The session collecting the metrics. - /// - parameter task: The task whose metrics have been collected. - /// - parameter metrics: The collected metrics. - @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) - @objc(URLSession:task:didFinishCollectingMetrics:) - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - self[task]?.delegate.metrics = metrics - } - -#endif - - /// Tells the delegate that the task finished transferring data. - /// - /// - parameter session: The session containing the task whose request finished transferring data. - /// - parameter task: The task whose request finished transferring data. - /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - /// Executed after it is determined that the request is not going to be retried - let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in - guard let strongSelf = self else { return } - - strongSelf.taskDidComplete?(session, task, error) - - strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) - - var userInfo: [String: Any] = [Notification.Key.Task: task] - - if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data { - userInfo[Notification.Key.ResponseData] = data - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidComplete, - object: strongSelf, - userInfo: userInfo - ) - - strongSelf[task] = nil - } - - guard let request = self[task], let sessionManager = sessionManager else { - completeTask(session, task, error) - return - } - - // Run all validations on the request before checking if an error occurred - request.validations.forEach { $0() } - - // Determine whether an error has occurred - var error: Error? = error - - if request.delegate.error != nil { - error = request.delegate.error - } - - /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request - /// should be retried. Otherwise, complete the task by notifying the task delegate. - if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in - guard shouldRetry else { completeTask(session, task, error) ; return } - - DispatchQueue.utility.after(timeDelay) { [weak self] in - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false - - if retrySucceeded, let task = request.task { - strongSelf[task] = request - return - } else { - completeTask(session, task, error) - } - } - } - } else { - completeTask(session, task, error) - } - } -} - -// MARK: - URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - /// Tells the delegate that the data task received the initial reply (headers) from the server. - /// - /// - parameter session: The session containing the data task that received an initial reply. - /// - parameter dataTask: The data task that received an initial reply. - /// - parameter response: A URL response object populated with headers. - /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - /// constant to indicate whether the transfer should continue as a data task or - /// should become a download task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } - - var disposition: URLSession.ResponseDisposition = .allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /// Tells the delegate that the data task was changed to a download task. - /// - /// - parameter session: The session containing the task that was replaced by a download task. - /// - parameter dataTask: The data task that was replaced by a download task. - /// - parameter downloadTask: The new download task that replaced the data task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) - } - } - - /// Tells the delegate that the data task has received some of the expected data. - /// - /// - parameter session: The session containing the data task that provided data. - /// - parameter dataTask: The data task that provided data. - /// - parameter data: A data object containing the transferred data. - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession(session, dataTask: dataTask, didReceive: data) - } - } - - /// Asks the delegate whether the data (or upload) task should store the response in the cache. - /// - /// - parameter session: The session containing the data (or upload) task. - /// - parameter dataTask: The data (or upload) task. - /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - /// caching policy and the values of certain received headers, such as the Pragma - /// and Cache-Control headers. - /// - parameter completionHandler: A block that your handler must call, providing either the original proposed - /// response, a modified version of that response, or NULL to prevent caching the - /// response. If your delegate implements this method, it must call this completion - /// handler; otherwise, your app leaks memory. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return - } - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } -} - -// MARK: - URLSessionDownloadDelegate - -extension SessionDelegate: URLSessionDownloadDelegate { - /// Tells the delegate that a download task has finished downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that finished. - /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - /// open the file for reading or move it to a permanent location in your app’s sandbox - /// container directory before returning from this delegate method. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - } - } - - /// Periodically informs the delegate about the download’s progress. - /// - /// - parameter session: The session containing the download task. - /// - parameter downloadTask: The download task. - /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate - /// method was called. - /// - parameter totalBytesWritten: The total number of bytes transferred so far. - /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - /// header. If this header was not provided, the value is - /// `NSURLSessionTransferSizeUnknown`. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /// Tells the delegate that the download task has resumed downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. - /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - /// existing content, then this value is zero. Otherwise, this value is an - /// integer representing the number of bytes on disk that do not need to be - /// retrieved again. - /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } -} - -// MARK: - URLSessionStreamDelegate - -#if !os(watchOS) - -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -extension SessionDelegate: URLSessionStreamDelegate { - /// Tells the delegate that the read side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /// Tells the delegate that the write side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /// Tells the delegate that the system has determined that a better route to the host is available. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - /// - parameter inputStream: The new input stream. - /// - parameter outputStream: The new output stream. - open func urlSession( - _ session: URLSession, - streamTask: URLSessionStreamTask, - didBecome inputStream: InputStream, - outputStream: OutputStream) - { - streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift deleted file mode 100644 index 02c36a76b7b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ /dev/null @@ -1,899 +0,0 @@ -// -// SessionManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -open class SessionManager { - - // MARK: - Helper Types - - /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - /// associated values. - /// - /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with - /// streaming information. - /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - /// error. - public enum MultipartFormDataEncodingResult { - case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) - case failure(Error) - } - - // MARK: - Properties - - /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use - /// directly for any ad hoc requests. - public static let `default`: SessionManager = { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders - - return SessionManager(configuration: configuration) - }() - - /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - public static let defaultHTTPHeaders: HTTPHeaders = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joined(separator: ", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` - let userAgent: String = { - if let info = Bundle.main.infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let version = ProcessInfo.processInfo.operatingSystemVersion - let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(macOS) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion: String = { - guard - let afInfo = Bundle(for: SessionManager.self).infoDictionary, - let build = afInfo["CFBundleShortVersionString"] - else { return "Unknown" } - - return "Alamofire/\(build)" - }() - - return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - /// Default memory threshold used when encoding `MultipartFormData` in bytes. - public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 - - /// The underlying session. - public let session: URLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - open var startRequestsImmediately: Bool = true - - /// The request adapter called each time a new request is created. - open var adapter: RequestAdapter? - - /// The request retrier called each time a request encounters an error to determine whether to retry the request. - open var retrier: RequestRetrier? { - get { return delegate.retrier } - set { delegate.retrier = newValue } - } - - /// The background completion handler closure provided by the UIApplicationDelegate - /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - /// will automatically call the handler. - /// - /// If you need to handle your own events before the handler is called, then you need to override the - /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - /// - /// `nil` by default. - open var backgroundCompletionHandler: (() -> Void)? - - let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) - - // MARK: - Lifecycle - - /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter configuration: The configuration used to construct the managed session. - /// `URLSessionConfiguration.default` by default. - /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - /// default. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance. - public init( - configuration: URLSessionConfiguration = URLSessionConfiguration.default, - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter session: The URL session. - /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. - public init?( - session: URLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionManager = self - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Data Request - - /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` - /// and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest - { - var originalRequest: URLRequest? - - do { - originalRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) - return request(encodedURLRequest) - } catch { - return request(originalRequest, failedWith: error) - } - } - - /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - var originalRequest: URLRequest? - - do { - originalRequest = try urlRequest.asURLRequest() - let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) - - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - let request = DataRequest(session: session, requestTask: .data(originalTask, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return request(originalRequest, failedWith: error) - } - } - - // MARK: Private - Request Implementation - - private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { - var requestTask: Request.RequestTask = .data(nil, nil) - - if let urlRequest = urlRequest { - let originalTask = DataRequest.Requestable(urlRequest: urlRequest) - requestTask = .data(originalTask, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: request, with: underlyingError) - } else { - if startRequestsImmediately { request.resume() } - } - - return request - } - - // MARK: - Download Request - - // MARK: URL Request - - /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, - /// `headers` and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) - return download(encodedURLRequest, to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save - /// them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try urlRequest.asURLRequest() - return download(.request(urlRequest), to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - // MARK: Resume Data - - /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve - /// the contents of the original request and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken - /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the - /// data is written incorrectly and will always fail to resume the download. For more information about the bug and - /// possible workarounds, please refer to the following Stack Overflow post: - /// - /// - http://stackoverflow.com/a/39347461/1342462 - /// - /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` - /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for - /// additional information. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - return download(.resumeData(resumeData), to: destination) - } - - // MARK: Private - Download Implementation - - private func download( - _ downloadable: DownloadRequest.Downloadable, - to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { - do { - let task = try downloadable.task(session: session, adapter: adapter, queue: queue) - let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) - - download.downloadDelegate.destination = destination - - delegate[task] = download - - if startRequestsImmediately { download.resume() } - - return download - } catch { - return download(downloadable, to: destination, failedWith: error) - } - } - - private func download( - _ downloadable: DownloadRequest.Downloadable?, - to destination: DownloadRequest.DownloadFileDestination?, - failedWith error: Error) - -> DownloadRequest - { - var downloadTask: Request.RequestTask = .download(nil, nil) - - if let downloadable = downloadable { - downloadTask = .download(downloadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - - let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) - download.downloadDelegate.destination = destination - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: download, with: underlyingError) - } else { - if startRequestsImmediately { download.resume() } - } - - return download - } - - // MARK: - Upload Request - - // MARK: File - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(fileURL, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.file(fileURL, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: Data - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(data, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.data(data, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(stream, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.stream(stream, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: MultipartFormData - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `url`, `method` and `headers`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - - return upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - queue: queue, - encodingCompletion: encodingCompletion - ) - } catch { - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `urlRequest`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter urlRequest: The URL request. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - DispatchQueue.global(qos: .utility).async { - let formData = MultipartFormData() - multipartFormData(formData) - - var tempFileURL: URL? - - do { - var urlRequestWithContentType = try urlRequest.asURLRequest() - urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - let data = try formData.encode() - - let encodingResult = MultipartFormDataEncodingResult.success( - request: self.upload(data, with: urlRequestWithContentType), - streamingFromDisk: false, - streamFileURL: nil - ) - - (queue ?? DispatchQueue.main).async { encodingCompletion?(encodingResult) } - } else { - let fileManager = FileManager.default - let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") - let fileName = UUID().uuidString - let fileURL = directoryURL.appendingPathComponent(fileName) - - tempFileURL = fileURL - - var directoryError: Error? - - // Create directory inside serial queue to ensure two threads don't do this in parallel - self.queue.sync { - do { - try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) - } catch { - directoryError = error - } - } - - if let directoryError = directoryError { throw directoryError } - - try formData.writeEncodedData(to: fileURL) - - let upload = self.upload(fileURL, with: urlRequestWithContentType) - - // Cleanup the temp file once the upload is complete - upload.delegate.queue.addOperation { - do { - try FileManager.default.removeItem(at: fileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { - let encodingResult = MultipartFormDataEncodingResult.success( - request: upload, - streamingFromDisk: true, - streamFileURL: fileURL - ) - - encodingCompletion?(encodingResult) - } - } - } catch { - // Cleanup the temp file in the event that the multipart form data encoding failed - if let tempFileURL = tempFileURL { - do { - try FileManager.default.removeItem(at: tempFileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - } - - // MARK: Private - Upload Implementation - - private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { - do { - let task = try uploadable.task(session: session, adapter: adapter, queue: queue) - let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) - - if case let .stream(inputStream, _) = uploadable { - upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } - } - - delegate[task] = upload - - if startRequestsImmediately { upload.resume() } - - return upload - } catch { - return upload(uploadable, failedWith: error) - } - } - - private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { - var uploadTask: Request.RequestTask = .upload(nil, nil) - - if let uploadable = uploadable { - uploadTask = .upload(uploadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: upload, with: underlyingError) - } else { - if startRequestsImmediately { upload.resume() } - } - - return upload - } - -#if !os(watchOS) - - // MARK: - Stream Request - - // MARK: Hostname and Port - - /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter hostName: The hostname of the server to connect to. - /// - parameter port: The port of the server to connect to. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return stream(.stream(hostName: hostName, port: port)) - } - - // MARK: NetService - - /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter netService: The net service used to identify the endpoint. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(with netService: NetService) -> StreamRequest { - return stream(.netService(netService)) - } - - // MARK: Private - Stream Implementation - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { - do { - let task = try streamable.task(session: session, adapter: adapter, queue: queue) - let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return stream(failedWith: error) - } - } - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(failedWith error: Error) -> StreamRequest { - let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) - if startRequestsImmediately { stream.resume() } - return stream - } - -#endif - - // MARK: - Internal - Retry Request - - func retry(_ request: Request) -> Bool { - guard let originalTask = request.originalTask else { return false } - - do { - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - - if let originalTask = request.task { - delegate[originalTask] = nil // removes the old request to avoid endless growth - } - - request.delegate.task = task // resets all task delegate data - - request.retryCount += 1 - request.startTime = CFAbsoluteTimeGetCurrent() - request.endTime = nil - - task.resume() - - return true - } catch { - request.delegate.error = error.underlyingAdaptError ?? error - return false - } - } - - private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { - DispatchQueue.utility.async { [weak self] in - guard let strongSelf = self else { return } - - retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in - guard let strongSelf = self else { return } - - guard shouldRetry else { - if strongSelf.startRequestsImmediately { request.resume() } - return - } - - DispatchQueue.utility.after(timeDelay) { - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.retry(request) - - if retrySucceeded, let task = request.task { - strongSelf.delegate[task] = request - } else { - if strongSelf.startRequestsImmediately { request.resume() } - } - } - } - } - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift deleted file mode 100644 index 5705737e49d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ /dev/null @@ -1,466 +0,0 @@ -// -// TaskDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as -/// executing all operations attached to the serial operation queue upon task completion. -open class TaskDelegate: NSObject { - - // MARK: Properties - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: OperationQueue - - /// The data returned by the server. - public var data: Data? { return nil } - - /// The error generated throughout the lifecyle of the task. - public var error: Error? - - var task: URLSessionTask? { - set { - taskLock.lock(); defer { taskLock.unlock() } - _task = newValue - } - get { - taskLock.lock(); defer { taskLock.unlock() } - return _task - } - } - - var initialResponseTime: CFAbsoluteTime? - var credential: URLCredential? - var metrics: AnyObject? // URLSessionTaskMetrics - - private var _task: URLSessionTask? { - didSet { reset() } - } - - private let taskLock = NSLock() - - // MARK: Lifecycle - - init(task: URLSessionTask?) { - _task = task - - self.queue = { - let operationQueue = OperationQueue() - - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.isSuspended = true - operationQueue.qualityOfService = .utility - - return operationQueue - }() - } - - func reset() { - error = nil - initialResponseTime = nil - } - - // MARK: URLSessionTaskDelegate - - var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? - - @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - @objc(URLSession:task:didReceiveChallenge:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } - - @objc(URLSession:task:needNewBodyStream:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - var bodyStream: InputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - @objc(URLSession:task:didCompleteWithError:) - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - if self.error == nil { self.error = error } - - if - let downloadDelegate = self as? DownloadTaskDelegate, - let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data - { - downloadDelegate.resumeData = resumeData - } - } - - queue.isSuspended = false - } - } -} - -// MARK: - - -class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { - - // MARK: Properties - - var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } - - override var data: Data? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var dataStream: ((_ data: Data) -> Void)? - - private var totalBytesReceived: Int64 = 0 - private var mutableData: Data - - private var expectedContentLength: Int64? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - mutableData = Data() - progress = Progress(totalUnitCount: 0) - - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - totalBytesReceived = 0 - mutableData = Data() - expectedContentLength = nil - } - - // MARK: URLSessionDataDelegate - - var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - var disposition: URLSession.ResponseDisposition = .allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data) - } else { - mutableData.append(data) - } - - let bytesReceived = Int64(data.count) - totalBytesReceived += bytesReceived - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - var cachedResponse: CachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } -} - -// MARK: - - -class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { - - // MARK: Properties - - var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var resumeData: Data? - override var data: Data? { return resumeData } - - var destination: DownloadRequest.DownloadFileDestination? - - var temporaryURL: URL? - var destinationURL: URL? - - var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - progress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - resumeData = nil - } - - // MARK: URLSessionDownloadDelegate - - var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? - var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - temporaryURL = location - - guard - let destination = destination, - let response = downloadTask.response as? HTTPURLResponse - else { return } - - let result = destination(location, response) - let destinationURL = result.destinationURL - let options = result.options - - self.destinationURL = destinationURL - - do { - if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { - try FileManager.default.removeItem(at: destinationURL) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destinationURL.deletingLastPathComponent() - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try FileManager.default.moveItem(at: location, to: destinationURL) - } catch { - self.error = error - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } -} - -// MARK: - - -class UploadTaskDelegate: DataTaskDelegate { - - // MARK: Properties - - var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } - - var uploadProgress: Progress - var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - uploadProgress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - uploadProgress = Progress(totalUnitCount: 0) - } - - // MARK: URLSessionTaskDelegate - - var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - func URLSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - if let uploadProgressHandler = uploadProgressHandler { - uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } - } - } - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift deleted file mode 100644 index 596c1bdc41f..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Timeline.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. -public struct Timeline { - /// The time the request was initialized. - public let requestStartTime: CFAbsoluteTime - - /// The time the first bytes were received from or sent to the server. - public let initialResponseTime: CFAbsoluteTime - - /// The time when the request was completed. - public let requestCompletedTime: CFAbsoluteTime - - /// The time when the response serialization was completed. - public let serializationCompletedTime: CFAbsoluteTime - - /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: TimeInterval - - /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: TimeInterval - - /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: TimeInterval - - /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: TimeInterval - - /// Creates a new `Timeline` instance with the specified request times. - /// - /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - /// Defaults to `0.0`. - /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - /// to `0.0`. - /// - /// - returns: The new `Timeline` instance. - public init( - requestStartTime: CFAbsoluteTime = 0.0, - initialResponseTime: CFAbsoluteTime = 0.0, - requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { - self.requestStartTime = requestStartTime - self.initialResponseTime = initialResponseTime - self.requestCompletedTime = requestCompletedTime - self.serializationCompletedTime = serializationCompletedTime - - self.latency = initialResponseTime - requestStartTime - self.requestDuration = requestCompletedTime - requestStartTime - self.serializationDuration = serializationCompletedTime - requestCompletedTime - self.totalDuration = serializationCompletedTime - requestStartTime - } -} - -// MARK: - CustomStringConvertible - -extension Timeline: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the latency, the request - /// duration and the total duration. - public var description: String { - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} - -// MARK: - CustomDebugStringConvertible - -extension Timeline: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes the request start time, the - /// initial response time, the request completed time, the serialization completed time, the latency, the request - /// duration and the total duration. - public var debugDescription: String { - let requestStartTime = String(format: "%.3f", self.requestStartTime) - let initialResponseTime = String(format: "%.3f", self.initialResponseTime) - let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) - let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Request Start Time\": " + requestStartTime, - "\"Initial Response Time\": " + initialResponseTime, - "\"Request Completed Time\": " + requestCompletedTime, - "\"Serialization Completed Time\": " + serializationCompletedTime, - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index 59e0bbb2b0e..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,321 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - - // MARK: Helper Types - - fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - /// Used to represent whether validation was successful or encountered an error resulting in a failure. - /// - /// - success: The validation was successful. - /// - failure: The validation failed encountering the provided error. - public enum ValidationResult { - case success - case failure(Error) - } - - fileprivate struct MIMEType { - let type: String - let subtype: String - - var isWildcard: Bool { return type == "*" && subtype == "*" } - - init?(_ string: String) { - let components: [String] = { - let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - - #if swift(>=3.2) - let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - #else - let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) - #endif - - return split.components(separatedBy: "/") - }() - - if let type = components.first, let subtype = components.last { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(_ mime: MIMEType) -> Bool { - switch (type, subtype) { - case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - // MARK: Properties - - fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } - - fileprivate var acceptableContentTypes: [String] { - if let accept = request?.value(forHTTPHeaderField: "Accept") { - return accept.components(separatedBy: ",") - } - - return ["*/*"] - } - - // MARK: Status Code - - fileprivate func validate( - statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == Int - { - if acceptableStatusCodes.contains(response.statusCode) { - return .success - } else { - let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) - return .failure(AFError.responseValidationFailed(reason: reason)) - } - } - - // MARK: Content Type - - fileprivate func validate( - contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) - -> ValidationResult - where S.Iterator.Element == String - { - guard let data = data, data.count > 0 else { return .success } - - guard - let responseContentType = response.mimeType, - let responseMIMEType = MIMEType(responseContentType) - else { - for contentType in acceptableContentTypes { - if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } - - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .unacceptableContentType( - acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType - ) - - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } -} - -// MARK: - - -extension DataRequest { - /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the - /// request was valid. - public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(self.request, response, self.delegate.data) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, data in - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -// MARK: - - -extension DownloadRequest { - /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a - /// destination URL, and returns whether the request was valid. - public typealias Validation = ( - _ request: URLRequest?, - _ response: HTTPURLResponse, - _ temporaryURL: URL?, - _ destinationURL: URL?) - -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - let request = self.request - let temporaryURL = self.downloadDelegate.temporaryURL - let destinationURL = self.downloadDelegate.destinationURL - - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(request, response, temporaryURL, destinationURL) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, _, _ in - let fileURL = self.downloadDelegate.fileURL - - guard let validFileURL = fileURL else { - return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) - } - - do { - let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } catch { - return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) - } - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json deleted file mode 100644 index bd27355c1ec..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "PetstoreClient", - "platforms": { - "ios": "9.0", - "osx": "10.11", - "tvos": "9.0" - }, - "version": "1.0.0", - "source": { - "git": "git@github.com:OpenAPITools/openapi-generator.git", - "tag": "v1.0.0" - }, - "authors": "", - "license": "Proprietary", - "homepage": "https://github.com/openapitools/openapi-generator", - "summary": "PetstoreClient", - "source_files": "PetstoreClient/Classes/**/*.swift", - "dependencies": { - "Alamofire": [ - "~> 4.9.0" - ] - } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Manifest.lock deleted file mode 100644 index ec15c4176b8..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Manifest.lock +++ /dev/null @@ -1,23 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - Alamofire - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: e5c71b862a32097342e341f7088805bbfc033a3e - -PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d - -COCOAPODS: 1.6.1 diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 656584d5fee..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1358 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00020DC43A4750034730E499473769DD /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A2B15E13C750A143B6E5D75B3EF08A /* Capitalization.swift */; }; - 012AD29BA655B831F2BE3F50ECB3BB85 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 089B2FA1773BD330AB52EF68B8C80090 /* AnotherFakeAPI.swift */; }; - 030881D9CABF4692C54FBFA6EECC2120 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA8498C6CE23C7D39CB4064A7D3C23E1 /* JSONEncodingHelper.swift */; }; - 0376FA9CA4578351B19BF40B86DAF6C8 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5DB595A95DED4373F5C07D3F42CE2FD /* StringBooleanMap.swift */; }; - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCC6858C85690F7AFEA7F6542EE9A69A /* Response.swift */; }; - 06908794B0BD0AD1C3328AD8BC4B82B6 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 153232F938AACFEEA39854060E3474F9 /* UserAPI.swift */; }; - 08E8DE6A3DE3C4AACE22E6FC79A780B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3677DD1DD5DA7B4FD4A71A12902EB1FF /* FileSchemaTestClass.swift */; }; - 09DCE775C28AEE3A523DDA9A9D485EBD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */; }; - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C15C076B531E2E7744C358418A0C0B5 /* Alamofire.swift */; }; - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0BB6E533AD607BA63514CA234EC13B7C /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDDE05FE69A89680803CCE1D0DDD1BC /* ClassModel.swift */; }; - 0F31785CFEFE0D75C731D380DA0B448A /* Pods-SwaggerClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1C676BF112685E2AF7EC6D0E50897D13 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */; }; - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = B06639F7A76DB8A9D0D0E41CDD7A6684 /* Notifications.swift */; }; - 23F07945B38A4B2E16A37448381E0728 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98D91A23E6414F7AF9797FDA6CDE301 /* FakeClassnameTags123API.swift */; }; - 2903713D6C0E8861C1C225BBE2005553 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B87E7F72022E18968F7E2884190864 /* Client.swift */; }; - 2CABDAFCB4D1AAFD4466F7B334075350 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3836ABD376ED2AA0133D2BAD057084A8 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - 345CE6549CCB11C35AB61D1C95ADB09E /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C6E73F71067053DDD4DD9F74AA71B8E /* CatAllOf.swift */; }; - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D59E1AD3CC394A93392FF3DC8CF2961 /* Request.swift */; }; - 35691EF5F336C91F9446841E240A546E /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD03ACAF8CC392DA908F3ACB71558AF5 /* Alamofire.framework */; }; - 39CB87943FDF18297E1B55D71759E6F0 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92C52F4995CB5F6F58D97D24A9714C82 /* HasOnlyReadOnly.swift */; }; - 3B2E7969FD3611446E0C3428B6FD506E /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20EB7CD037B7A541D39B47B96C87D3BB /* User.swift */; }; - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */; }; - 3D0DF4B3FD3DBE3E87FC471D5098B08C /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3906E6EA8C3F2D343170E909DB10D598 /* ApiResponse.swift */; }; - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFF7F7716086D54E6308EE52C8227B87 /* DispatchQueue+Alamofire.swift */; }; - 41B161B3DF73F631EB37EBC84E989A86 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3772CF80ABE43A1C8B98C26806814C03 /* StoreAPI.swift */; }; - 43E11CFB9D9D75B04BD1C3710122FEDC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEF884C644D97FF181378FD4B0BEE949 /* CodableHelper.swift */; }; - 45C8A9D978B277C6D772171CBC9D00A2 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BD21CB9821EDFA7774D5BF62F1447C /* EnumClass.swift */; }; - 4C67C04C2DEA0EC6A77990134EFC44F0 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C754B2060CD998899F4CDCEFBA8CBECA /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 515561C8235B83BE66FDAFB598982F1A /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72401B0640F79CE5D0D95808F3809EAD /* Dog.swift */; }; - 518CCCA0F4D22FF969EBC3E3077FCC92 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C77186D6C808BF3DF45437777838E5 /* MapTest.swift */; }; - 52BB72DA85ECC5DF65DB17DC7FE78794 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4A16AB1E07D9C345D25EAA6D65AFB7D /* Pet.swift */; }; - 568163D7220FA2ACE76E2A089ED97367 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817EF1FA2F48683ECFBC85626DD432E2 /* TypeHolderDefault.swift */; }; - 5C270500727A5736EEBC6E2B5545122F /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28821B55DAEFB6A4294C4E45B43C7189 /* List.swift */; }; - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32DB5272AD01ECD0B09A86818A7754C4 /* Timeline.swift */; }; - 616E91DF676728E98777E4C2221F30FF /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4F7045EE429F75182B88C370E5BF6B /* OuterEnum.swift */; }; - 65D4CBC83D44D1079503E162E56EB1FC /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E4A82321F917DE99EA9ED0A4144F8D /* Return.swift */; }; - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */; }; - 6C9EBD7E61FF56596714B6E4AD520FC8 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5BA3CDA675544F94288511FF6B9A95C /* ArrayOfNumberOnly.swift */; }; - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B03859BDC36782899379E222720A297 /* ResponseSerialization.swift */; }; - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D01BA8472F25D39F718F71557EDC8DD /* ParameterEncoding.swift */; }; - 7038EA9A3B5C95A704774228807F5BA5 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F38D962B7C2FCDF7409552EE9E8C179 /* EnumTest.swift */; }; - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5460AD0F6241621B45A17AB23A8E5B7 /* NetworkReachabilityManager.swift */; }; - 76C734AAD021F98862B409EED92BF7D9 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE2B0929020E3EB62D72BCE6C283C4A /* Models.swift */; }; - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BE16989701DCA0B781F86A093D7C5E22 /* Alamofire-dummy.m */; }; - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C759635F88377BD7E2DEDE04C23C62 /* TaskDelegate.swift */; }; - 793AD3096164E125123B8D52AB5A9C22 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9405B96DD389E966703C925771AE55 /* APIHelper.swift */; }; - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D5A0E300C04A6DF88D620788FE38780 /* AFError.swift */; }; - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */; }; - 82855B7090157FE1AD95290494B727D1 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FF775468F874E6C4B902D12CAACC0E3 /* APIs.swift */; }; - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4453BE339B79900FDC53E34FE5589CB /* ServerTrustPolicy.swift */; }; - 9013E87432F737C0EBC7E8F2CCAD38BD /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A840A90776C4F3557DA50E60D43461 /* Name.swift */; }; - 939C0EDFC1A0E1371F8B4C08A8ED35FB /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68F2B0ADDEF9CCD4DDE5F0B6DBFB8EA /* AdditionalPropertiesClass.swift */; }; - 93F8F669E4B04B4DB531D251706A500E /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADA544DF1F872830B177489DD976D01 /* OuterComposite.swift */; }; - 962EFB8F73E4755A382781A0985D65F7 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCED4E7B2ED8CD7B003737E8500B966 /* SpecialModelName.swift */; }; - 9E4EAB317A51EDDEB0F989FAFE98FF2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22171F3CD54600483DE4B4FF7CA42C92 /* Order.swift */; }; - 9E6C948768C510831A7E51DACDADF113 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0F2DC364EA3C24C587CAC4E7F2CACE6 /* File.swift */; }; - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F640F61D5BEE8132009BAEAA65B587A4 /* SessionDelegate.swift */; }; - A3A401A337A4033FDD4A3394D1F6DC1B /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23FFF870A0F3262D972AF2BE98E98138 /* TypeHolderExample.swift */; }; - A3BC5451845657493232AC0525864F5A /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E55CD80321500D34FB83EFB4EFE1B1 /* ArrayOfArrayOfNumberOnly.swift */; }; - A5DA5B46FB2ACACFD536CFA4773F72EB /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792A29ED78AA102548A11FE803EBA726 /* AnimalFarm.swift */; }; - A78CA9C83C384A1BC74AB5AE5E11B9C6 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679BA825A029EC81F394535E7D9659AF /* DogAllOf.swift */; }; - A7D6F30DD00FE0799E3226CAD9B4F0F8 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CD835DD6D842734F41B52C7DD76912 /* ReadOnlyFirst.swift */; }; - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33115EC2A5164913C68F8BD170389EEE /* Validation.swift */; }; - AACBCD94F445251BFB8EF281B06070FC /* Pods-SwaggerClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */; }; - AE8E12A37981E08C499422F0D7DB3562 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B4C8BF21BF7235F0CAFCEF0A0BE6F346 /* PetstoreClient-dummy.m */; }; - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCE3D7EDCA41F256D471B40BBFD3FCE /* MultipartFormData.swift */; }; - B09502FF56FD28B439A446079AA44828 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BB3E8F1A01B496D370968537953FBC /* NumberOnly.swift */; }; - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A825CFEBAE606149BF0047C9F5B209 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C213B705CDEE5ABB1DD45D2D7C399916 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8300E68C77CC2ED6253C2D484EBA225 /* Model200Response.swift */; }; - C47592022591B4355678CD336729BCFD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8632E8244954DC5394C9F221CDA12310 /* FormatTest.swift */; }; - C617ABA269C12A01EE8FB2B48E2EE24E /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69D6F2D2B19627D7A73D8F815F56BBA /* Animal.swift */; }; - C625241EED7F5ABFA3421D1D2F33B9A7 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FB3702E62314B602C9C852FEC5CE0D0 /* PetAPI.swift */; }; - D0DD0433ABCBA1390C9D519BB8AF31B0 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED376BFA75520EB1CC8120AC95A2E285 /* ArrayTest.swift */; }; - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D7E25E371731FAE44F46A9F392CB5D5 /* SessionManager.swift */; }; - D6766263F6808C3555974C9090704382 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBE9E546637EAC1DDD7E9C12BA7BF345 /* Extensions.swift */; }; - E238DCD8EEAA785F12BC409CBC9FFEB2 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1E2D32BAA3BD9844DB191DDADBCF12 /* Configuration.swift */; }; - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD807F155301ECA538A2C1C296E1186D /* Result.swift */; }; - ED805B7A7AFAE3166128F815B88FF4C9 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBFF7DE6C567908623AE0BCD2F3A3857 /* Tag.swift */; }; - F19C4993AFB23C230522A94EDC95D0AE /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514BDF609598FE35A5525ED6A181A1A8 /* JSONEncodableEncoding.swift */; }; - F60E9EC2AB3CE86877D7ED2FEB8C6352 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1ED5E98426A54EB45C305EE40C983E /* Category.swift */; }; - FBA30FAE70E2ABBD40E4DAC76BA02AED /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0718B8E646D897336A3ECCC5B9090E53 /* AlamofireImplementations.swift */; }; - FBE98F05475A9917F6D17BE065FEF26B /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7BC3FD15E2040B5431F44C865823CCE /* Cat.swift */; }; - FDA5017C03A4F8778D62CB4317B41830 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE0F580409071DCE59A5124FF9E82BFB /* EnumArrays.swift */; }; - FF88BA5F972D79C65C8A0A55F1CE0652 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D5784904C828E658DF5CEA4EF788AA /* FakeAPI.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 20B39FDE827AD3DF13AE317B5E936361 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - 5D76C10F5893692E171BC309A834B39D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - AFC558F1633DAC5C557E46CBB263C91E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 014B234AEDAF6EC680B4B670020FC6E9; - remoteInfo = PetstoreClient; - }; - FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6CC172B84D895FFAF079AB5AA2CBFA6E; - remoteInfo = "Pods-SwaggerClient"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 04439F9CD02EAF4B3E540DBCEC9EA5A6 /* Name.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Name.md; path = docs/Name.md; sourceTree = ""; }; - 0663474ACA37520625211A9E29325B1A /* ArrayTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayTest.md; path = docs/ArrayTest.md; sourceTree = ""; }; - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; - 0718B8E646D897336A3ECCC5B9090E53 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireImplementations.swift; path = PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift; sourceTree = ""; }; - 089B2FA1773BD330AB52EF68B8C80090 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - 0A4CE8D126B31FEC4F59711D8376AC5F /* User.md */ = {isa = PBXFileReference; includeInIndex = 1; name = User.md; path = docs/User.md; sourceTree = ""; }; - 0D01BA8472F25D39F718F71557EDC8DD /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 0DE2B0929020E3EB62D72BCE6C283C4A /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Models.swift; path = PetstoreClient/Classes/OpenAPIs/Models.swift; sourceTree = ""; }; - 12CFBC4CD7ACA7011491663F90C67FF6 /* StoreAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StoreAPI.md; path = docs/StoreAPI.md; sourceTree = ""; }; - 153232F938AACFEEA39854060E3474F9 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 15A825CFEBAE606149BF0047C9F5B209 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 17D5784904C828E658DF5CEA4EF788AA /* FakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 1C15C076B531E2E7744C358418A0C0B5 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 1F294BB7B28A9A6C885F7B64CBEF8443 /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PetstoreClient.modulemap; sourceTree = ""; }; - 20EB7CD037B7A541D39B47B96C87D3BB /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - 22171F3CD54600483DE4B4FF7CA42C92 /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 22E224873CA034BCFD7B0AE231A85146 /* PetAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PetAPI.md; path = docs/PetAPI.md; sourceTree = ""; }; - 23FFF870A0F3262D972AF2BE98E98138 /* TypeHolderExample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 27578F75ADA7E233FE419BF675250D04 /* TypeHolderDefault.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderDefault.md; path = docs/TypeHolderDefault.md; sourceTree = ""; }; - 28821B55DAEFB6A4294C4E45B43C7189 /* List.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 2B05E36DA6DC2AEF31D2C707F891F13C /* Capitalization.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Capitalization.md; path = docs/Capitalization.md; sourceTree = ""; }; - 2E7DDA3730731B94AF27E5CA45625575 /* Model200Response.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Model200Response.md; path = docs/Model200Response.md; sourceTree = ""; }; - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClient-umbrella.h"; sourceTree = ""; }; - 2F38D962B7C2FCDF7409552EE9E8C179 /* EnumTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = ""; }; - 32DB5272AD01ECD0B09A86818A7754C4 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 33115EC2A5164913C68F8BD170389EEE /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 3557A28606F4FEFE5FF30989436A4FF2 /* MixedPropertiesAndAdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MixedPropertiesAndAdditionalPropertiesClass.md; path = docs/MixedPropertiesAndAdditionalPropertiesClass.md; sourceTree = ""; }; - 3677DD1DD5DA7B4FD4A71A12902EB1FF /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 3772CF80ABE43A1C8B98C26806814C03 /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - 3836ABD376ED2AA0133D2BAD057084A8 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 3906E6EA8C3F2D343170E909DB10D598 /* ApiResponse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - 3D7E25E371731FAE44F46A9F392CB5D5 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 3FF775468F874E6C4B902D12CAACC0E3 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIs.swift; path = PetstoreClient/Classes/OpenAPIs/APIs.swift; sourceTree = ""; }; - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = ""; }; - 4BC259C4FDD151785EAB4C9816561400 /* Animal.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Animal.md; path = docs/Animal.md; sourceTree = ""; }; - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = ""; }; - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-Info.plist"; sourceTree = ""; }; - 4F249C32C93DD1A7204802FC37895B5D /* Return.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Return.md; path = docs/Return.md; sourceTree = ""; }; - 4F652B81B77453471CD91E7CE335DD64 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - 4FA198DABCDFA1B65FD0ECB5909B1E67 /* ApiResponse.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ApiResponse.md; path = docs/ApiResponse.md; sourceTree = ""; }; - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClientTests-umbrella.h"; sourceTree = ""; }; - 514BDF609598FE35A5525ED6A181A1A8 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodableEncoding.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift; sourceTree = ""; }; - 5325403E6DEEFE98D5F986007376B8CF /* FileSchemaTestClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FileSchemaTestClass.md; path = docs/FileSchemaTestClass.md; sourceTree = ""; }; - 55BD21CB9821EDFA7774D5BF62F1447C /* EnumClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 58958D8BF88758686FC4807824BB6119 /* OuterComposite.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterComposite.md; path = docs/OuterComposite.md; sourceTree = ""; }; - 58B41BC62A3BC0B256C157232C133465 /* DogAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = DogAllOf.md; path = docs/DogAllOf.md; sourceTree = ""; }; - 5ACC5320A57F68BD14E44D7BCAD0568D /* ReadOnlyFirst.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ReadOnlyFirst.md; path = docs/ReadOnlyFirst.md; sourceTree = ""; }; - 5ADA544DF1F872830B177489DD976D01 /* OuterComposite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - 5B5C5D70BB1678D0B0F2B09085740561 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 5F4F7045EE429F75182B88C370E5BF6B /* OuterEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - 60734197F65F663D2DD26AEBF6213FBB /* AnotherFakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnotherFakeAPI.md; path = docs/AnotherFakeAPI.md; sourceTree = ""; }; - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClient.modulemap"; sourceTree = ""; }; - 637137BD1D26949B2D3D0AC4E7920421 /* Category.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Category.md; path = docs/Category.md; sourceTree = ""; }; - 66492E1963B233D5714ADBD39D100676 /* ArrayOfArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfArrayOfNumberOnly.md; path = docs/ArrayOfArrayOfNumberOnly.md; sourceTree = ""; }; - 679BA825A029EC81F394535E7D9659AF /* DogAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - 67BB3E8F1A01B496D370968537953FBC /* NumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - 6F47323ACFBEA80C53357E0C388D0E2D /* PetstoreClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PetstoreClient-Info.plist"; sourceTree = ""; }; - 71358FB3ED39E943406F45ACCDACA01F /* EnumClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumClass.md; path = docs/EnumClass.md; sourceTree = ""; }; - 72401B0640F79CE5D0D95808F3809EAD /* Dog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - 727A1A9E6AD1839E9FC8F0AD288C09D7 /* StringBooleanMap.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StringBooleanMap.md; path = docs/StringBooleanMap.md; sourceTree = ""; }; - 729855D9EC40248C3CC1D640DE20C997 /* PetstoreClient.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = PetstoreClient.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 7545CF55BE345EA7C318A64E7BFB1C70 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 75C759635F88377BD7E2DEDE04C23C62 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 792A29ED78AA102548A11FE803EBA726 /* AnimalFarm.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 7A32170042F951AE49896CBDDC2E7E8A /* CatAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = CatAllOf.md; path = docs/CatAllOf.md; sourceTree = ""; }; - 7B03859BDC36782899379E222720A297 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 7E8622C681C084B791773E335FA776B9 /* Cat.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Cat.md; path = docs/Cat.md; sourceTree = ""; }; - 817EF1FA2F48683ECFBC85626DD432E2 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - 8632E8244954DC5394C9F221CDA12310 /* FormatTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 88A2B15E13C750A143B6E5D75B3EF08A /* Capitalization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - 8C6E73F71067053DDD4DD9F74AA71B8E /* CatAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 8D5A0E300C04A6DF88D620788FE38780 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 8FB3702E62314B602C9C852FEC5CE0D0 /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-Info.plist"; sourceTree = ""; }; - 92C52F4995CB5F6F58D97D24A9714C82 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-frameworks.sh"; sourceTree = ""; }; - 94C9B18D927BCE2DBC85C868385CD0DC /* MapTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MapTest.md; path = docs/MapTest.md; sourceTree = ""; }; - 951102FA2D54D54F57AB43F3898A804E /* Pet.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Pet.md; path = docs/Pet.md; sourceTree = ""; }; - 96AC98D0CCFA778066DE3211DF4A612B /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-acknowledgements.plist"; sourceTree = ""; }; - 9A6C4CED509D8701C458FCF9F7112D6E /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 9B6003DFE8913662F0CBE3C8AB6BF079 /* AdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AdditionalPropertiesClass.md; path = docs/AdditionalPropertiesClass.md; sourceTree = ""; }; - 9D59E1AD3CC394A93392FF3DC8CF2961 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9FDDE05FE69A89680803CCE1D0DDD1BC /* ClassModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - A0F2DC364EA3C24C587CAC4E7F2CACE6 /* File.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - A0F6B1DBF2B95867B02CA909027E6CA1 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - A2B53D4EE4458330882CB18DA789EB2C /* Tag.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Tag.md; path = docs/Tag.md; sourceTree = ""; }; - A48DFE63F7A3B54CA683DC3A18D4F013 /* EnumArrays.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumArrays.md; path = docs/EnumArrays.md; sourceTree = ""; }; - A6CD835DD6D842734F41B52C7DD76912 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - A921EAFEFCF3702C415A14A85AD33CA5 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - AFA7A7162F97A757E4763382AF0A37A5 /* HasOnlyReadOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = HasOnlyReadOnly.md; path = docs/HasOnlyReadOnly.md; sourceTree = ""; }; - AFF7F7716086D54E6308EE52C8227B87 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - B06639F7A76DB8A9D0D0E41CDD7A6684 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - B075721274485FCD049ED26FCAF19040 /* Client.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Client.md; path = docs/Client.md; sourceTree = ""; }; - B2DB18088B850357CD707077683B52AD /* File.md */ = {isa = PBXFileReference; includeInIndex = 1; name = File.md; path = docs/File.md; sourceTree = ""; }; - B4C8BF21BF7235F0CAFCEF0A0BE6F346 /* PetstoreClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PetstoreClient-dummy.m"; sourceTree = ""; }; - B5049D245471AD411FABB9F1AFCC3640 /* TypeHolderExample.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderExample.md; path = docs/TypeHolderExample.md; sourceTree = ""; }; - B5BA3CDA675544F94288511FF6B9A95C /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B5E55CD80321500D34FB83EFB4EFE1B1 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - B62D0F5045D0C460A66547BC6573E9AD /* OuterEnum.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterEnum.md; path = docs/OuterEnum.md; sourceTree = ""; }; - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - B98D91A23E6414F7AF9797FDA6CDE301 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - BA8498C6CE23C7D39CB4064A7D3C23E1 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift; sourceTree = ""; }; - BACC7B6084A20F85B87D5D8CE45D9B2D /* SpecialModelName.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SpecialModelName.md; path = docs/SpecialModelName.md; sourceTree = ""; }; - BBE656A24894D09F52A6A5DD556EE6E9 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - BE16989701DCA0B781F86A093D7C5E22 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - BE9405B96DD389E966703C925771AE55 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = PetstoreClient/Classes/OpenAPIs/APIHelper.swift; sourceTree = ""; }; - BEF884C644D97FF181378FD4B0BEE949 /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CodableHelper.swift; path = PetstoreClient/Classes/OpenAPIs/CodableHelper.swift; sourceTree = ""; }; - BFCE3D7EDCA41F256D471B40BBFD3FCE /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - C2C77186D6C808BF3DF45437777838E5 /* MapTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - C4453BE339B79900FDC53E34FE5589CB /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - C5DB595A95DED4373F5C07D3F42CE2FD /* StringBooleanMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - C69D6F2D2B19627D7A73D8F815F56BBA /* Animal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - C754B2060CD998899F4CDCEFBA8CBECA /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; - C7BC9D7D5D14F73B0AA9505317F78B81 /* UserAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = UserAPI.md; path = docs/UserAPI.md; sourceTree = ""; }; - CCC6858C85690F7AFEA7F6542EE9A69A /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - CD03ACAF8CC392DA908F3ACB71558AF5 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CD1ED5E98426A54EB45C305EE40C983E /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - CDD2BF41E57383D03ED6FE46857749F0 /* ArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfNumberOnly.md; path = docs/ArrayOfNumberOnly.md; sourceTree = ""; }; - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClientTests-acknowledgements.markdown"; sourceTree = ""; }; - D1364C96E01989778FFAFDA5E4F88C1B /* AnimalFarm.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnimalFarm.md; path = docs/AnimalFarm.md; sourceTree = ""; }; - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = ""; }; - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = ""; }; - D4A16AB1E07D9C345D25EAA6D65AFB7D /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - D52A73EE9B54C37128A536FC390D5EB8 /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; - D5519F42E98E0AB5F8D4EABFC2378552 /* FakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeAPI.md; path = docs/FakeAPI.md; sourceTree = ""; }; - D60CA6A9D0CCD77FEC2C9DBB0EE13FA4 /* NumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = NumberOnly.md; path = docs/NumberOnly.md; sourceTree = ""; }; - D6E1BAA8EEFE9F5BCEA8E3B9E9FDC427 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D7BC3FD15E2040B5431F44C865823CCE /* Cat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - D87D78CA89682ED11EEC8AC29F47C45D /* FakeClassnameTags123API.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeClassnameTags123API.md; path = docs/FakeClassnameTags123API.md; sourceTree = ""; }; - DB1E2D32BAA3BD9844DB191DDADBCF12 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = PetstoreClient/Classes/OpenAPIs/Configuration.swift; sourceTree = ""; }; - DBCED4E7B2ED8CD7B003737E8500B966 /* SpecialModelName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - DD807F155301ECA538A2C1C296E1186D /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - DF3D111A192664C5E1E84DAAF5B62D53 /* Order.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Order.md; path = docs/Order.md; sourceTree = ""; }; - DF65595F7AD2991DF64DF985C4695033 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; - E68F2B0ADDEF9CCD4DDE5F0B6DBFB8EA /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - E8300E68C77CC2ED6253C2D484EBA225 /* Model200Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - EA8063C6A81DB1729871C85C5E3202A1 /* List.md */ = {isa = PBXFileReference; includeInIndex = 1; name = List.md; path = docs/List.md; sourceTree = ""; }; - EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - EBFF7DE6C567908623AE0BCD2F3A3857 /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - ED376BFA75520EB1CC8120AC95A2E285 /* ArrayTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F2301C552DA30E664E889DB6147B0DD7 /* EnumTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumTest.md; path = docs/EnumTest.md; sourceTree = ""; }; - F5460AD0F6241621B45A17AB23A8E5B7 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - F640F61D5BEE8132009BAEAA65B587A4 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - F8B87E7F72022E18968F7E2884190864 /* Client.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - F8E4A82321F917DE99EA9ED0A4144F8D /* Return.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - F9A840A90776C4F3557DA50E60D43461 /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - FB6837ABA24B342F12F11E34BDBEFDDF /* ClassModel.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ClassModel.md; path = docs/ClassModel.md; sourceTree = ""; }; - FBC96A1C4393E17023FA61DF149438E6 /* FormatTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FormatTest.md; path = docs/FormatTest.md; sourceTree = ""; }; - FBE9E546637EAC1DDD7E9C12BA7BF345 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = PetstoreClient/Classes/OpenAPIs/Extensions.swift; sourceTree = ""; }; - FE0F580409071DCE59A5124FF9E82BFB /* EnumArrays.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - FEE4CB22965AE4F1B84A1573C068DE50 /* Dog.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Dog.md; path = docs/Dog.md; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 03039E780407C611A7B87769DDA406E5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 09DCE775C28AEE3A523DDA9A9D485EBD /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0C46B78575669218123DF0F491A2EC1C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 35691EF5F336C91F9446841E240A546E /* Alamofire.framework in Frameworks */, - 1C676BF112685E2AF7EC6D0E50897D13 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0ED469A71233C185DA54A94B4F90C573 /* Models */ = { - isa = PBXGroup; - children = ( - E68F2B0ADDEF9CCD4DDE5F0B6DBFB8EA /* AdditionalPropertiesClass.swift */, - C69D6F2D2B19627D7A73D8F815F56BBA /* Animal.swift */, - 792A29ED78AA102548A11FE803EBA726 /* AnimalFarm.swift */, - 3906E6EA8C3F2D343170E909DB10D598 /* ApiResponse.swift */, - B5E55CD80321500D34FB83EFB4EFE1B1 /* ArrayOfArrayOfNumberOnly.swift */, - B5BA3CDA675544F94288511FF6B9A95C /* ArrayOfNumberOnly.swift */, - ED376BFA75520EB1CC8120AC95A2E285 /* ArrayTest.swift */, - 88A2B15E13C750A143B6E5D75B3EF08A /* Capitalization.swift */, - D7BC3FD15E2040B5431F44C865823CCE /* Cat.swift */, - 8C6E73F71067053DDD4DD9F74AA71B8E /* CatAllOf.swift */, - CD1ED5E98426A54EB45C305EE40C983E /* Category.swift */, - 9FDDE05FE69A89680803CCE1D0DDD1BC /* ClassModel.swift */, - F8B87E7F72022E18968F7E2884190864 /* Client.swift */, - 72401B0640F79CE5D0D95808F3809EAD /* Dog.swift */, - 679BA825A029EC81F394535E7D9659AF /* DogAllOf.swift */, - FE0F580409071DCE59A5124FF9E82BFB /* EnumArrays.swift */, - 55BD21CB9821EDFA7774D5BF62F1447C /* EnumClass.swift */, - 2F38D962B7C2FCDF7409552EE9E8C179 /* EnumTest.swift */, - A0F2DC364EA3C24C587CAC4E7F2CACE6 /* File.swift */, - 3677DD1DD5DA7B4FD4A71A12902EB1FF /* FileSchemaTestClass.swift */, - 8632E8244954DC5394C9F221CDA12310 /* FormatTest.swift */, - 92C52F4995CB5F6F58D97D24A9714C82 /* HasOnlyReadOnly.swift */, - 28821B55DAEFB6A4294C4E45B43C7189 /* List.swift */, - C2C77186D6C808BF3DF45437777838E5 /* MapTest.swift */, - 3836ABD376ED2AA0133D2BAD057084A8 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - E8300E68C77CC2ED6253C2D484EBA225 /* Model200Response.swift */, - F9A840A90776C4F3557DA50E60D43461 /* Name.swift */, - 67BB3E8F1A01B496D370968537953FBC /* NumberOnly.swift */, - 22171F3CD54600483DE4B4FF7CA42C92 /* Order.swift */, - 5ADA544DF1F872830B177489DD976D01 /* OuterComposite.swift */, - 5F4F7045EE429F75182B88C370E5BF6B /* OuterEnum.swift */, - D4A16AB1E07D9C345D25EAA6D65AFB7D /* Pet.swift */, - A6CD835DD6D842734F41B52C7DD76912 /* ReadOnlyFirst.swift */, - F8E4A82321F917DE99EA9ED0A4144F8D /* Return.swift */, - DBCED4E7B2ED8CD7B003737E8500B966 /* SpecialModelName.swift */, - C5DB595A95DED4373F5C07D3F42CE2FD /* StringBooleanMap.swift */, - EBFF7DE6C567908623AE0BCD2F3A3857 /* Tag.swift */, - 817EF1FA2F48683ECFBC85626DD432E2 /* TypeHolderDefault.swift */, - 23FFF870A0F3262D972AF2BE98E98138 /* TypeHolderExample.swift */, - 20EB7CD037B7A541D39B47B96C87D3BB /* User.swift */, - ); - name = Models; - path = PetstoreClient/Classes/OpenAPIs/Models; - sourceTree = ""; - }; - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 33028780CD913FF16EA9A16F3FC66D2B /* PetstoreClient */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 1E609BB01CDC050D96D2080D93E7DF1A /* Pod */ = { - isa = PBXGroup; - children = ( - 9B6003DFE8913662F0CBE3C8AB6BF079 /* AdditionalPropertiesClass.md */, - 4BC259C4FDD151785EAB4C9816561400 /* Animal.md */, - D1364C96E01989778FFAFDA5E4F88C1B /* AnimalFarm.md */, - 60734197F65F663D2DD26AEBF6213FBB /* AnotherFakeAPI.md */, - 4FA198DABCDFA1B65FD0ECB5909B1E67 /* ApiResponse.md */, - 66492E1963B233D5714ADBD39D100676 /* ArrayOfArrayOfNumberOnly.md */, - CDD2BF41E57383D03ED6FE46857749F0 /* ArrayOfNumberOnly.md */, - 0663474ACA37520625211A9E29325B1A /* ArrayTest.md */, - 2B05E36DA6DC2AEF31D2C707F891F13C /* Capitalization.md */, - 7E8622C681C084B791773E335FA776B9 /* Cat.md */, - 7A32170042F951AE49896CBDDC2E7E8A /* CatAllOf.md */, - 637137BD1D26949B2D3D0AC4E7920421 /* Category.md */, - FB6837ABA24B342F12F11E34BDBEFDDF /* ClassModel.md */, - B075721274485FCD049ED26FCAF19040 /* Client.md */, - FEE4CB22965AE4F1B84A1573C068DE50 /* Dog.md */, - 58B41BC62A3BC0B256C157232C133465 /* DogAllOf.md */, - A48DFE63F7A3B54CA683DC3A18D4F013 /* EnumArrays.md */, - 71358FB3ED39E943406F45ACCDACA01F /* EnumClass.md */, - F2301C552DA30E664E889DB6147B0DD7 /* EnumTest.md */, - D5519F42E98E0AB5F8D4EABFC2378552 /* FakeAPI.md */, - D87D78CA89682ED11EEC8AC29F47C45D /* FakeClassnameTags123API.md */, - B2DB18088B850357CD707077683B52AD /* File.md */, - 5325403E6DEEFE98D5F986007376B8CF /* FileSchemaTestClass.md */, - FBC96A1C4393E17023FA61DF149438E6 /* FormatTest.md */, - AFA7A7162F97A757E4763382AF0A37A5 /* HasOnlyReadOnly.md */, - EA8063C6A81DB1729871C85C5E3202A1 /* List.md */, - 94C9B18D927BCE2DBC85C868385CD0DC /* MapTest.md */, - 3557A28606F4FEFE5FF30989436A4FF2 /* MixedPropertiesAndAdditionalPropertiesClass.md */, - 2E7DDA3730731B94AF27E5CA45625575 /* Model200Response.md */, - 04439F9CD02EAF4B3E540DBCEC9EA5A6 /* Name.md */, - D60CA6A9D0CCD77FEC2C9DBB0EE13FA4 /* NumberOnly.md */, - DF3D111A192664C5E1E84DAAF5B62D53 /* Order.md */, - 58958D8BF88758686FC4807824BB6119 /* OuterComposite.md */, - B62D0F5045D0C460A66547BC6573E9AD /* OuterEnum.md */, - 951102FA2D54D54F57AB43F3898A804E /* Pet.md */, - 22E224873CA034BCFD7B0AE231A85146 /* PetAPI.md */, - 729855D9EC40248C3CC1D640DE20C997 /* PetstoreClient.podspec */, - 5B5C5D70BB1678D0B0F2B09085740561 /* README.md */, - 5ACC5320A57F68BD14E44D7BCAD0568D /* ReadOnlyFirst.md */, - 4F249C32C93DD1A7204802FC37895B5D /* Return.md */, - BACC7B6084A20F85B87D5D8CE45D9B2D /* SpecialModelName.md */, - 12CFBC4CD7ACA7011491663F90C67FF6 /* StoreAPI.md */, - 727A1A9E6AD1839E9FC8F0AD288C09D7 /* StringBooleanMap.md */, - A2B53D4EE4458330882CB18DA789EB2C /* Tag.md */, - 27578F75ADA7E233FE419BF675250D04 /* TypeHolderDefault.md */, - B5049D245471AD411FABB9F1AFCC3640 /* TypeHolderExample.md */, - 0A4CE8D126B31FEC4F59711D8376AC5F /* User.md */, - C7BC9D7D5D14F73B0AA9505317F78B81 /* UserAPI.md */, - ); - name = Pod; - sourceTree = ""; - }; - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */, - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 33028780CD913FF16EA9A16F3FC66D2B /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - 0718B8E646D897336A3ECCC5B9090E53 /* AlamofireImplementations.swift */, - BE9405B96DD389E966703C925771AE55 /* APIHelper.swift */, - 3FF775468F874E6C4B902D12CAACC0E3 /* APIs.swift */, - BEF884C644D97FF181378FD4B0BEE949 /* CodableHelper.swift */, - DB1E2D32BAA3BD9844DB191DDADBCF12 /* Configuration.swift */, - FBE9E546637EAC1DDD7E9C12BA7BF345 /* Extensions.swift */, - 514BDF609598FE35A5525ED6A181A1A8 /* JSONEncodableEncoding.swift */, - BA8498C6CE23C7D39CB4064A7D3C23E1 /* JSONEncodingHelper.swift */, - 0DE2B0929020E3EB62D72BCE6C283C4A /* Models.swift */, - 89961DD23FFA3CD864F344F00D402FB9 /* APIs */, - 0ED469A71233C185DA54A94B4F90C573 /* Models */, - 1E609BB01CDC050D96D2080D93E7DF1A /* Pod */, - 5B6407A1BF3581D31EDF042E5AEE8C90 /* Support Files */, - ); - name = PetstoreClient; - path = ../..; - sourceTree = ""; - }; - 5B6407A1BF3581D31EDF042E5AEE8C90 /* Support Files */ = { - isa = PBXGroup; - children = ( - 1F294BB7B28A9A6C885F7B64CBEF8443 /* PetstoreClient.modulemap */, - D52A73EE9B54C37128A536FC390D5EB8 /* PetstoreClient.xcconfig */, - B4C8BF21BF7235F0CAFCEF0A0BE6F346 /* PetstoreClient-dummy.m */, - 6F47323ACFBEA80C53357E0C388D0E2D /* PetstoreClient-Info.plist */, - DF65595F7AD2991DF64DF985C4695033 /* PetstoreClient-prefix.pch */, - C754B2060CD998899F4CDCEFBA8CBECA /* PetstoreClient-umbrella.h */, - ); - name = "Support Files"; - path = "SwaggerClientTests/Pods/Target Support Files/PetstoreClient"; - sourceTree = ""; - }; - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */ = { - isa = PBXGroup; - children = ( - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */, - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */, - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */, - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */, - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */, - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */, - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */, - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */, - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */, - ); - name = "Pods-SwaggerClient"; - path = "Target Support Files/Pods-SwaggerClient"; - sourceTree = ""; - }; - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */, - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */, - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */, - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */, - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */, - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */, - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */, - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = "Pods-SwaggerClientTests"; - path = "Target Support Files/Pods-SwaggerClientTests"; - sourceTree = ""; - }; - 89961DD23FFA3CD864F344F00D402FB9 /* APIs */ = { - isa = PBXGroup; - children = ( - 089B2FA1773BD330AB52EF68B8C80090 /* AnotherFakeAPI.swift */, - 17D5784904C828E658DF5CEA4EF788AA /* FakeAPI.swift */, - B98D91A23E6414F7AF9797FDA6CDE301 /* FakeClassnameTags123API.swift */, - 8FB3702E62314B602C9C852FEC5CE0D0 /* PetAPI.swift */, - 3772CF80ABE43A1C8B98C26806814C03 /* StoreAPI.swift */, - 153232F938AACFEEA39854060E3474F9 /* UserAPI.swift */, - ); - name = APIs; - path = PetstoreClient/Classes/OpenAPIs/APIs; - sourceTree = ""; - }; - 90FDDC7F5D24472360CA259A8D40AE98 /* Pods */ = { - isa = PBXGroup; - children = ( - ABBD6121E62B33A53CF07892A75F2030 /* Alamofire */, - ); - name = Pods; - sourceTree = ""; - }; - 9BA86B3EDA3C295EC1B9E7963803A4C5 /* Support Files */ = { - isa = PBXGroup; - children = ( - 4F652B81B77453471CD91E7CE335DD64 /* Alamofire.modulemap */, - A0F6B1DBF2B95867B02CA909027E6CA1 /* Alamofire.xcconfig */, - BE16989701DCA0B781F86A093D7C5E22 /* Alamofire-dummy.m */, - 96AC98D0CCFA778066DE3211DF4A612B /* Alamofire-Info.plist */, - 7545CF55BE345EA7C318A64E7BFB1C70 /* Alamofire-prefix.pch */, - 15A825CFEBAE606149BF0047C9F5B209 /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - A4521C22EBDAA43169A2378066A85356 /* iOS */ = { - isa = PBXGroup; - children = ( - EB0E56BEED9117DC5F2C7AF6582AB9C2 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - ABBD6121E62B33A53CF07892A75F2030 /* Alamofire */ = { - isa = PBXGroup; - children = ( - 8D5A0E300C04A6DF88D620788FE38780 /* AFError.swift */, - 1C15C076B531E2E7744C358418A0C0B5 /* Alamofire.swift */, - AFF7F7716086D54E6308EE52C8227B87 /* DispatchQueue+Alamofire.swift */, - BFCE3D7EDCA41F256D471B40BBFD3FCE /* MultipartFormData.swift */, - F5460AD0F6241621B45A17AB23A8E5B7 /* NetworkReachabilityManager.swift */, - B06639F7A76DB8A9D0D0E41CDD7A6684 /* Notifications.swift */, - 0D01BA8472F25D39F718F71557EDC8DD /* ParameterEncoding.swift */, - 9D59E1AD3CC394A93392FF3DC8CF2961 /* Request.swift */, - CCC6858C85690F7AFEA7F6542EE9A69A /* Response.swift */, - 7B03859BDC36782899379E222720A297 /* ResponseSerialization.swift */, - DD807F155301ECA538A2C1C296E1186D /* Result.swift */, - C4453BE339B79900FDC53E34FE5589CB /* ServerTrustPolicy.swift */, - F640F61D5BEE8132009BAEAA65B587A4 /* SessionDelegate.swift */, - 3D7E25E371731FAE44F46A9F392CB5D5 /* SessionManager.swift */, - 75C759635F88377BD7E2DEDE04C23C62 /* TaskDelegate.swift */, - 32DB5272AD01ECD0B09A86818A7754C4 /* Timeline.swift */, - 33115EC2A5164913C68F8BD170389EEE /* Validation.swift */, - 9BA86B3EDA3C295EC1B9E7963803A4C5 /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */, - EFA834D50E48CF4E37AC7A12D391AC85 /* Frameworks */, - 90FDDC7F5D24472360CA259A8D40AE98 /* Pods */, - D4BB97E11D129F9DC0B3EFD7B82F99F5 /* Products */, - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */, - ); - sourceTree = ""; - }; - D4BB97E11D129F9DC0B3EFD7B82F99F5 /* Products */ = { - isa = PBXGroup; - children = ( - A921EAFEFCF3702C415A14A85AD33CA5 /* Alamofire.framework */, - D6E1BAA8EEFE9F5BCEA8E3B9E9FDC427 /* PetstoreClient.framework */, - 9A6C4CED509D8701C458FCF9F7112D6E /* Pods_SwaggerClient.framework */, - BBE656A24894D09F52A6A5DD556EE6E9 /* Pods_SwaggerClientTests.framework */, - ); - name = Products; - sourceTree = ""; - }; - EFA834D50E48CF4E37AC7A12D391AC85 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CD03ACAF8CC392DA908F3ACB71558AF5 /* Alamofire.framework */, - A4521C22EBDAA43169A2378066A85356 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9A5935BD5E97C4C2ADAE50D3AE92B1B1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0F31785CFEFE0D75C731D380DA0B448A /* Pods-SwaggerClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A5A64812E84222999005ACDF7F62E2E4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 4C67C04C2DEA0EC6A77990134EFC44F0 /* PetstoreClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 014B234AEDAF6EC680B4B670020FC6E9 /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 382DBE4A1A56F1CB2D9416262C3B398A /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - A5A64812E84222999005ACDF7F62E2E4 /* Headers */, - BFFCD424113053CC873EB416E81CABA8 /* Sources */, - 0C46B78575669218123DF0F491A2EC1C /* Frameworks */, - D67BC32B7DC8ED90F08BD38FAA56169D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5DE874B58B87742561569DD4D3D1B529 /* PBXTargetDependency */, - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = D6E1BAA8EEFE9F5BCEA8E3B9E9FDC427 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */, - A1C8B029F600160149A2404C342F6E50 /* Sources */, - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */, - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = A921EAFEFCF3702C415A14A85AD33CA5 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - 6CC172B84D895FFAF079AB5AA2CBFA6E /* Pods-SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 572D6D84C594D0A2084C64BFCC57B307 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */; - buildPhases = ( - 9A5935BD5E97C4C2ADAE50D3AE92B1B1 /* Headers */, - 7666F8939D4526BEC7F64C149EF4A2C8 /* Sources */, - 03039E780407C611A7B87769DDA406E5 /* Frameworks */, - A5C180CA72BCA89C035E9BA519F5DCF4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - F234C94DB11B7BBDD1958805D4F5AB78 /* PBXTargetDependency */, - C14616AC8F7012FA96FE36A7D42D8D82 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClient"; - productName = "Pods-SwaggerClient"; - productReference = 9A6C4CED509D8701C458FCF9F7112D6E /* Pods_SwaggerClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */; - buildPhases = ( - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */, - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */, - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */, - C2801E627F662CD786BE9F42773CBECF /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClientTests"; - productName = "Pods-SwaggerClientTests"; - productReference = BBE656A24894D09F52A6A5DD556EE6E9 /* Pods_SwaggerClientTests.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = D4BB97E11D129F9DC0B3EFD7B82F99F5 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */, - 014B234AEDAF6EC680B4B670020FC6E9 /* PetstoreClient */, - 6CC172B84D895FFAF079AB5AA2CBFA6E /* Pods-SwaggerClient */, - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A5C180CA72BCA89C035E9BA519F5DCF4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C2801E627F662CD786BE9F42773CBECF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D67BC32B7DC8ED90F08BD38FAA56169D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 7666F8939D4526BEC7F64C149EF4A2C8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AACBCD94F445251BFB8EF281B06070FC /* Pods-SwaggerClient-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A1C8B029F600160149A2404C342F6E50 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */, - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */, - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */, - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */, - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */, - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */, - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */, - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */, - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */, - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */, - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */, - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */, - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */, - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */, - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */, - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */, - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */, - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BFFCD424113053CC873EB416E81CABA8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 939C0EDFC1A0E1371F8B4C08A8ED35FB /* AdditionalPropertiesClass.swift in Sources */, - FBA30FAE70E2ABBD40E4DAC76BA02AED /* AlamofireImplementations.swift in Sources */, - C617ABA269C12A01EE8FB2B48E2EE24E /* Animal.swift in Sources */, - A5DA5B46FB2ACACFD536CFA4773F72EB /* AnimalFarm.swift in Sources */, - 012AD29BA655B831F2BE3F50ECB3BB85 /* AnotherFakeAPI.swift in Sources */, - 793AD3096164E125123B8D52AB5A9C22 /* APIHelper.swift in Sources */, - 3D0DF4B3FD3DBE3E87FC471D5098B08C /* ApiResponse.swift in Sources */, - 82855B7090157FE1AD95290494B727D1 /* APIs.swift in Sources */, - A3BC5451845657493232AC0525864F5A /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 6C9EBD7E61FF56596714B6E4AD520FC8 /* ArrayOfNumberOnly.swift in Sources */, - D0DD0433ABCBA1390C9D519BB8AF31B0 /* ArrayTest.swift in Sources */, - 00020DC43A4750034730E499473769DD /* Capitalization.swift in Sources */, - FBE98F05475A9917F6D17BE065FEF26B /* Cat.swift in Sources */, - 345CE6549CCB11C35AB61D1C95ADB09E /* CatAllOf.swift in Sources */, - F60E9EC2AB3CE86877D7ED2FEB8C6352 /* Category.swift in Sources */, - 0BB6E533AD607BA63514CA234EC13B7C /* ClassModel.swift in Sources */, - 2903713D6C0E8861C1C225BBE2005553 /* Client.swift in Sources */, - 43E11CFB9D9D75B04BD1C3710122FEDC /* CodableHelper.swift in Sources */, - E238DCD8EEAA785F12BC409CBC9FFEB2 /* Configuration.swift in Sources */, - 515561C8235B83BE66FDAFB598982F1A /* Dog.swift in Sources */, - A78CA9C83C384A1BC74AB5AE5E11B9C6 /* DogAllOf.swift in Sources */, - FDA5017C03A4F8778D62CB4317B41830 /* EnumArrays.swift in Sources */, - 45C8A9D978B277C6D772171CBC9D00A2 /* EnumClass.swift in Sources */, - 7038EA9A3B5C95A704774228807F5BA5 /* EnumTest.swift in Sources */, - D6766263F6808C3555974C9090704382 /* Extensions.swift in Sources */, - FF88BA5F972D79C65C8A0A55F1CE0652 /* FakeAPI.swift in Sources */, - 23F07945B38A4B2E16A37448381E0728 /* FakeClassnameTags123API.swift in Sources */, - 9E6C948768C510831A7E51DACDADF113 /* File.swift in Sources */, - 08E8DE6A3DE3C4AACE22E6FC79A780B5 /* FileSchemaTestClass.swift in Sources */, - C47592022591B4355678CD336729BCFD /* FormatTest.swift in Sources */, - 39CB87943FDF18297E1B55D71759E6F0 /* HasOnlyReadOnly.swift in Sources */, - F19C4993AFB23C230522A94EDC95D0AE /* JSONEncodableEncoding.swift in Sources */, - 030881D9CABF4692C54FBFA6EECC2120 /* JSONEncodingHelper.swift in Sources */, - 5C270500727A5736EEBC6E2B5545122F /* List.swift in Sources */, - 518CCCA0F4D22FF969EBC3E3077FCC92 /* MapTest.swift in Sources */, - 2CABDAFCB4D1AAFD4466F7B334075350 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - C213B705CDEE5ABB1DD45D2D7C399916 /* Model200Response.swift in Sources */, - 76C734AAD021F98862B409EED92BF7D9 /* Models.swift in Sources */, - 9013E87432F737C0EBC7E8F2CCAD38BD /* Name.swift in Sources */, - B09502FF56FD28B439A446079AA44828 /* NumberOnly.swift in Sources */, - 9E4EAB317A51EDDEB0F989FAFE98FF2C /* Order.swift in Sources */, - 93F8F669E4B04B4DB531D251706A500E /* OuterComposite.swift in Sources */, - 616E91DF676728E98777E4C2221F30FF /* OuterEnum.swift in Sources */, - 52BB72DA85ECC5DF65DB17DC7FE78794 /* Pet.swift in Sources */, - C625241EED7F5ABFA3421D1D2F33B9A7 /* PetAPI.swift in Sources */, - AE8E12A37981E08C499422F0D7DB3562 /* PetstoreClient-dummy.m in Sources */, - A7D6F30DD00FE0799E3226CAD9B4F0F8 /* ReadOnlyFirst.swift in Sources */, - 65D4CBC83D44D1079503E162E56EB1FC /* Return.swift in Sources */, - 962EFB8F73E4755A382781A0985D65F7 /* SpecialModelName.swift in Sources */, - 41B161B3DF73F631EB37EBC84E989A86 /* StoreAPI.swift in Sources */, - 0376FA9CA4578351B19BF40B86DAF6C8 /* StringBooleanMap.swift in Sources */, - ED805B7A7AFAE3166128F815B88FF4C9 /* Tag.swift in Sources */, - 568163D7220FA2ACE76E2A089ED97367 /* TypeHolderDefault.swift in Sources */, - A3A401A337A4033FDD4A3394D1F6DC1B /* TypeHolderExample.swift in Sources */, - 3B2E7969FD3611446E0C3428B6FD506E /* User.swift in Sources */, - 06908794B0BD0AD1C3328AD8BC4B82B6 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5DE874B58B87742561569DD4D3D1B529 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = 20B39FDE827AD3DF13AE317B5E936361 /* PBXContainerItemProxy */; - }; - C14616AC8F7012FA96FE36A7D42D8D82 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PetstoreClient; - target = 014B234AEDAF6EC680B4B670020FC6E9 /* PetstoreClient */; - targetProxy = AFC558F1633DAC5C557E46CBB263C91E /* PBXContainerItemProxy */; - }; - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Pods-SwaggerClient"; - target = 6CC172B84D895FFAF079AB5AA2CBFA6E /* Pods-SwaggerClient */; - targetProxy = FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */; - }; - F234C94DB11B7BBDD1958805D4F5AB78 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = 5D76C10F5893692E171BC309A834B39D /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0F9DE41FC108FC05B463FCAC96ED8EF9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 21979AE1790135C30E0899E08565E57B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 2EAEE6B722B898F409C2B1C6A56C5B9B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 41268AF552E2DC6A5873C87C81174F7D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A0F6B1DBF2B95867B02CA909027E6CA1 /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 574F3585003DE50C3AF6674F2F554A8F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D52A73EE9B54C37128A536FC390D5EB8 /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 63EF74233563D17636D6B6BC64BAC633 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 7A138A57D62AD3F0FEBC72142392B2CD /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A345BCBDE6C296957161A3E85A47A280 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A0F6B1DBF2B95867B02CA909027E6CA1 /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B758FBEC27C09CD6E60596DDF8B1CDBB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - D69DDD32C596B1D7288985DF36FA2133 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D52A73EE9B54C37128A536FC390D5EB8 /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 382DBE4A1A56F1CB2D9416262C3B398A /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D69DDD32C596B1D7288985DF36FA2133 /* Debug */, - 574F3585003DE50C3AF6674F2F554A8F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0F9DE41FC108FC05B463FCAC96ED8EF9 /* Debug */, - B758FBEC27C09CD6E60596DDF8B1CDBB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 572D6D84C594D0A2084C64BFCC57B307 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2EAEE6B722B898F409C2B1C6A56C5B9B /* Debug */, - 63EF74233563D17636D6B6BC64BAC633 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7A138A57D62AD3F0FEBC72142392B2CD /* Debug */, - 21979AE1790135C30E0899E08565E57B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 41268AF552E2DC6A5873C87C81174F7D /* Debug */, - A345BCBDE6C296957161A3E85A47A280 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist deleted file mode 100644 index bb5a9ffc808..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.9.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594242e..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3cd82..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fab6b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig deleted file mode 100644 index 12a1450811b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index 2aba7e548ba..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.7.3 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist deleted file mode 100644 index cba258550bd..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m deleted file mode 100644 index 749b412f85c..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PetstoreClient : NSObject -@end -@implementation PodsDummy_PetstoreClient -@end diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 2a366623a36..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap deleted file mode 100644 index 7fdfc46cf79..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PetstoreClient { - umbrella header "PetstoreClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig deleted file mode 100644 index 62fe7dab13d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown deleted file mode 100644 index 973d79a75d2..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown +++ /dev/null @@ -1,26 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Alamofire - -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist deleted file mode 100644 index 5c049b5d2a3..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - Alamofire - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m deleted file mode 100644 index 6236440163b..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClient : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClient -@end diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh deleted file mode 100755 index c0ca87ce2de..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index b7da51aaf25..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig deleted file mode 100644 index b9d6266ecd1..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "PetstoreClient" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap deleted file mode 100644 index ef919b6c0d1..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClient { - umbrella header "Pods-SwaggerClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig deleted file mode 100644 index b9d6266ecd1..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "PetstoreClient" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown deleted file mode 100644 index 102af753851..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist deleted file mode 100644 index 7acbad1eabb..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m deleted file mode 100644 index bb17fa2b80f..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClientTests : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClientTests -@end diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh deleted file mode 100755 index 08e3eaaca45..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index b2e4925a9e4..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig deleted file mode 100644 index b7db85d42cc..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "PetstoreClient" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap deleted file mode 100644 index a848da7ffb3..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClientTests { - umbrella header "Pods-SwaggerClientTests-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig deleted file mode 100644 index b7db85d42cc..00000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "PetstoreClient" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index 4fd31d11f51..32c3ecd268a 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -290,16 +290,12 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", ); name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", diff --git a/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md index 45781360154..57b6e3a17e6 100644 --- a/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/default/docs/Name.md b/samples/client/petstore/swift4/default/docs/Name.md index 2be75d062e4..f7b180292cd 100644 --- a/samples/client/petstore/swift4/default/docs/Name.md +++ b/samples/client/petstore/swift4/default/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md index e3f16038b97..ed537b87598 100644 --- a/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/objcCompatible/.gitignore b/samples/client/petstore/swift4/objcCompatible/.gitignore index 5e5d5cebcf4..586cc3f2d73 100644 --- a/samples/client/petstore/swift4/objcCompatible/.gitignore +++ b/samples/client/petstore/swift4/objcCompatible/.gitignore @@ -43,18 +43,18 @@ playground.xcworkspace # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts +Carthage/Checkouts Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index 0e97bd19efb..c3a2c7076fa 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/Package.swift b/samples/client/petstore/swift4/objcCompatible/Package.swift new file mode 100644 index 00000000000..e5c5f0f33b8 --- /dev/null +++ b/samples/client/petstore/swift4/objcCompatible/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj index 55021e5d191..b9d30943d8f 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj @@ -3,296 +3,296 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */; }; + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */, - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */, - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */, - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */, - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */, - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */, - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */, + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */, + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */, + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */, + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */, + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -300,12 +300,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -313,108 +313,108 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */, - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */, - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */, - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */, - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */, - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */, + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */, + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */, + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */, + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */, + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -431,7 +431,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -439,7 +442,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -494,11 +497,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -515,7 +518,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -523,7 +529,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -568,8 +574,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -577,25 +583,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453..e8ac84fa992 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index f2b7565e2d9..00000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var _id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(_id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self._id = _id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case petId - case quantity - case shipDate - case status - case complete - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index 971ce9d4db6..00000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var _id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(_id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self._id = _id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case category - case name - case photoUrls - case tags - case status - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 83efe72b8a4..00000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var _id: Int64? - public var name: String? - - public init(_id: Int64?, name: String?) { - self._id = _id - self.name = name - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 7d6b24b9e10..00000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var _id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(_id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self._id = _id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case username - case firstName - case lastName - case email - case password - case phone - case userStatus - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md index 45781360154..57b6e3a17e6 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/objcCompatible/docs/Name.md b/samples/client/petstore/swift4/objcCompatible/docs/Name.md index 2be75d062e4..f7b180292cd 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/Name.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md index e3f16038b97..ed537b87598 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/promisekit/.gitignore b/samples/client/petstore/swift4/promisekit/.gitignore index 5e5d5cebcf4..fb589c9d53c 100644 --- a/samples/client/petstore/swift4/promisekit/.gitignore +++ b/samples/client/petstore/swift4/promisekit/.gitignore @@ -43,18 +43,18 @@ playground.xcworkspace # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ -# Carthage +Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts +Carthage/Checkouts Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md diff --git a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION index 0e97bd19efb..c3a2c7076fa 100644 --- a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/Cartfile b/samples/client/petstore/swift4/promisekit/Cartfile index 9835749b67f..91e7f600518 100644 --- a/samples/client/petstore/swift4/promisekit/Cartfile +++ b/samples/client/petstore/swift4/promisekit/Cartfile @@ -1,2 +1,2 @@ github "Alamofire/Alamofire" ~> 4.9.0 -github "mxcl/PromiseKit" ~> 4.4 +github "mxcl/PromiseKit" ~> 6.11.0 diff --git a/samples/client/petstore/swift4/promisekit/Package.swift b/samples/client/petstore/swift4/promisekit/Package.swift new file mode 100644 index 00000000000..7ba5c67b456 --- /dev/null +++ b/samples/client/petstore/swift4/promisekit/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire", "PromiseKit"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec b/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec index 8648503b218..373b3f26afc 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec @@ -10,6 +10,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'PromiseKit/CorePromise', '~> 4.4.0' + s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj index 89e8b9f2389..04f57402a18 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj @@ -3,279 +3,279 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A196B597ADCA20BEC280660B57FF7333 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2 /* PromiseKit.framework */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A586582C92491DF9C12D27E2 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, - A196B597ADCA20BEC280660B57FF7333 /* PromiseKit.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, - A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + A586582C92491DF9C12D27E2 /* PromiseKit.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -283,12 +283,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -296,101 +296,101 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -407,7 +407,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -415,7 +418,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -470,11 +473,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -491,7 +494,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -499,7 +505,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -544,8 +550,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -553,25 +559,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453..e8ac84fa992 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 2a2e7ab048a..7aa5c9c5415 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -20,9 +20,9 @@ open class AnotherFakeAPI { let deferred = Promise.pending() call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index d0c22ac8696..d5c10dc1187 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -19,9 +19,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -56,9 +56,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -93,9 +93,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -130,9 +130,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -167,9 +167,9 @@ open class FakeAPI { let deferred = Promise.pending() testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -203,9 +203,9 @@ open class FakeAPI { let deferred = Promise.pending() testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -242,9 +242,9 @@ open class FakeAPI { let deferred = Promise.pending() testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -294,9 +294,9 @@ open class FakeAPI { let deferred = Promise.pending() testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -439,9 +439,9 @@ open class FakeAPI { let deferred = Promise.pending() testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -505,9 +505,9 @@ open class FakeAPI { let deferred = Promise.pending() testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -558,9 +558,9 @@ open class FakeAPI { let deferred = Promise.pending() testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -595,9 +595,9 @@ open class FakeAPI { let deferred = Promise.pending() testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index a6bb118c582..309f70b47cf 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -20,9 +20,9 @@ open class FakeClassnameTags123API { let deferred = Promise.pending() testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 55d39cf88fd..29f579c9614 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -20,9 +20,9 @@ open class PetAPI { let deferred = Promise.pending() addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -60,9 +60,9 @@ open class PetAPI { let deferred = Promise.pending() deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -116,9 +116,9 @@ open class PetAPI { let deferred = Promise<[Pet]>.pending() findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -161,9 +161,9 @@ open class PetAPI { let deferred = Promise<[Pet]>.pending() findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -206,9 +206,9 @@ open class PetAPI { let deferred = Promise.pending() getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -251,9 +251,9 @@ open class PetAPI { let deferred = Promise.pending() updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -292,9 +292,9 @@ open class PetAPI { let deferred = Promise.pending() updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -344,9 +344,9 @@ open class PetAPI { let deferred = Promise.pending() uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -398,9 +398,9 @@ open class PetAPI { let deferred = Promise.pending() uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 05b2e4ce463..41eb3f85acb 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -20,9 +20,9 @@ open class StoreAPI { let deferred = Promise.pending() deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -59,9 +59,9 @@ open class StoreAPI { let deferred = Promise<[String: Int]>.pending() getInventoryWithRequestBuilder().execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -100,9 +100,9 @@ open class StoreAPI { let deferred = Promise.pending() getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -142,9 +142,9 @@ open class StoreAPI { let deferred = Promise.pending() placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 3c10309130f..40c2b88f21d 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -20,9 +20,9 @@ open class UserAPI { let deferred = Promise.pending() createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -57,9 +57,9 @@ open class UserAPI { let deferred = Promise.pending() createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -93,9 +93,9 @@ open class UserAPI { let deferred = Promise.pending() createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -129,9 +129,9 @@ open class UserAPI { let deferred = Promise.pending() deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -169,9 +169,9 @@ open class UserAPI { let deferred = Promise.pending() getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -211,9 +211,9 @@ open class UserAPI { let deferred = Promise.pending() loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -254,9 +254,9 @@ open class UserAPI { let deferred = Promise.pending() logoutUserWithRequestBuilder().execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -290,9 +290,9 @@ open class UserAPI { let deferred = Promise.pending() updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift index b07e60d99e3..2365ab6057d 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -182,9 +182,9 @@ extension RequestBuilder { let deferred = Promise>.pending() self.execute { (response: Response?, error: Error?) in if let response = response { - deferred.fulfill(response) + deferred.resolver.fulfill(response) } else { - deferred.reject(error!) + deferred.resolver.reject(error!) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/.gitignore new file mode 100644 index 00000000000..0269c2f56db --- /dev/null +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Podfile.lock index 355d4c9f5f0..11db93632ec 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Podfile.lock +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Podfile.lock @@ -9,7 +9,7 @@ DEPENDENCIES: - PetstoreClient (from `../`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Alamofire - PromiseKit @@ -24,4 +24,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d -COCOAPODS: 1.6.1 +COCOAPODS: 1.8.0.beta.2 diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE deleted file mode 100644 index 38a301a1db8..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/README.md deleted file mode 100644 index 9fdc9c73873..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/README.md +++ /dev/null @@ -1,242 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) -[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Alamofire is an HTTP networking library written in Swift. - -- [Features](#features) -- [Component Libraries](#component-libraries) -- [Requirements](#requirements) -- [Migration Guides](#migration-guides) -- [Communication](#communication) -- [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md) - - **Intro -** [Making a Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-a-request), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameter Encoding](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#parameter-encoding), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) -- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) - - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-manager), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-delegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request) - - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests) - - **Model Objects -** [Custom Response Serialization](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#custom-response-serialization) - - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability) -- [Open Radars](#open-radars) -- [FAQ](#faq) -- [Credits](#credits) -- [Donations](#donations) -- [License](#license) - -## Features - -- [x] Chainable Request / Response Methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download File using Request or Resume Data -- [x] Authentication with URLCredential -- [x] HTTP Response Validation -- [x] Upload and Download Progress Closures with Progress -- [x] cURL Command Output -- [x] Dynamically Adapt and Retry Requests -- [x] TLS Certificate and Public Key Pinning -- [x] Network Reachability -- [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.3+ -- Swift 3.1+ - -## Migration Guides - -- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication -- If you **need help with making network requests**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. -- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. -- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue and follow the guide. The more detail the better! -- If you **want to contribute**, submit a pull request. - -## Installation - -### CocoaPods - -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 1.7+ is required to build Alamofire 4.9+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '10.0' -use_frameworks! - -target '' do - pod 'Alamofire', '~> 4.9' -end -``` - -Then, run the following command: - -```bash -$ pod install -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](https://brew.sh/) using the following command: - -```bash -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 4.9 -``` - -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - -### Swift Package Manager - -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. - -Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. - -#### Swift 3 - -```swift -dependencies: [ - .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) -] -``` - -#### Swift 4 - -```swift -dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") -] -``` - -### Manually - -If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - - ```bash - $ git init - ``` - -- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command: - - ```bash - $ git submodule add https://github.com/Alamofire/Alamofire.git - ``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- And that's it! - - > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Open Radars - -The following radars have some effect on the current implementation of Alamofire. - -- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- `rdar://26870455` - Background URL Session Configurations do not work in the simulator -- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - -## Resolved Radars - -The following radars have been resolved over time after being filed against the Alamofire project. - -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - -### What logic belongs in a Router vs. a Request Adapter? - -Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. - -The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization. -Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. -Donating to the ASF will enable us to: - -- Pay our yearly legal fees to keep the non-profit in good status -- Pay for our mail servers to help us stay on top of all questions and security issues -- Potentially fund test servers to make it easier for us to test the edge cases -- Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. -We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. -With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. -If you use any of our libraries for work, see if your employers would be interested in donating. -Any amount you can donate today to help us reach our goal would be greatly appreciated. - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ) - -## License - -Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift deleted file mode 100644 index b163f6038fa..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift +++ /dev/null @@ -1,460 +0,0 @@ -// -// AFError.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with -/// their own associated reasons. -/// -/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. -/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. -/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. -/// - responseValidationFailed: Returned when a `validate()` call fails. -/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. -public enum AFError: Error { - /// The underlying reason the parameter encoding error occurred. - /// - /// - missingURL: The URL request did not have a URL to encode. - /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the - /// encoding process. - /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during - /// encoding process. - public enum ParameterEncodingFailureReason { - case missingURL - case jsonEncodingFailed(error: Error) - case propertyListEncodingFailed(error: Error) - } - - /// The underlying reason the multipart encoding error occurred. - /// - /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a - /// file URL. - /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty - /// `lastPathComponent` or `pathExtension. - /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. - /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw - /// an error. - /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. - /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by - /// the system. - /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided - /// threw an error. - /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. - /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the - /// encoded data to disk. - /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file - /// already exists at the provided `fileURL`. - /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is - /// not a file URL. - /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an - /// underlying error. - /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with - /// underlying system error. - public enum MultipartEncodingFailureReason { - case bodyPartURLInvalid(url: URL) - case bodyPartFilenameInvalid(in: URL) - case bodyPartFileNotReachable(at: URL) - case bodyPartFileNotReachableWithError(atURL: URL, error: Error) - case bodyPartFileIsDirectory(at: URL) - case bodyPartFileSizeNotAvailable(at: URL) - case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) - case bodyPartInputStreamCreationFailed(for: URL) - - case outputStreamCreationFailed(for: URL) - case outputStreamFileAlreadyExists(at: URL) - case outputStreamURLInvalid(url: URL) - case outputStreamWriteFailed(error: Error) - - case inputStreamReadFailed(error: Error) - } - - /// The underlying reason the response validation error occurred. - /// - /// - dataFileNil: The data file containing the server response did not exist. - /// - dataFileReadFailed: The data file containing the server response could not be read. - /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` - /// provided did not contain wildcard type. - /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided - /// `acceptableContentTypes`. - /// - unacceptableStatusCode: The response status code was not acceptable. - public enum ResponseValidationFailureReason { - case dataFileNil - case dataFileReadFailed(at: URL) - case missingContentType(acceptableContentTypes: [String]) - case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) - case unacceptableStatusCode(code: Int) - } - - /// The underlying reason the response serialization error occurred. - /// - /// - inputDataNil: The server response contained no data. - /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. - /// - inputFileNil: The file containing the server response did not exist. - /// - inputFileReadFailed: The file containing the server response could not be read. - /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. - /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. - /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. - public enum ResponseSerializationFailureReason { - case inputDataNil - case inputDataNilOrZeroLength - case inputFileNil - case inputFileReadFailed(at: URL) - case stringSerializationFailed(encoding: String.Encoding) - case jsonSerializationFailed(error: Error) - case propertyListSerializationFailed(error: Error) - } - - case invalidURL(url: URLConvertible) - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) - case multipartEncodingFailed(reason: MultipartEncodingFailureReason) - case responseValidationFailed(reason: ResponseValidationFailureReason) - case responseSerializationFailed(reason: ResponseSerializationFailureReason) -} - -// MARK: - Adapt Error - -struct AdaptError: Error { - let error: Error -} - -extension Error { - var underlyingAdaptError: Error? { return (self as? AdaptError)?.error } -} - -// MARK: - Error Booleans - -extension AFError { - /// Returns whether the AFError is an invalid URL error. - public var isInvalidURLError: Bool { - if case .invalidURL = self { return true } - return false - } - - /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncodingError: Bool { - if case .parameterEncodingFailed = self { return true } - return false - } - - /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties - /// will contain the associated values. - public var isMultipartEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, and `responseCode` properties will contain the associated values. - public var isResponseValidationError: Bool { - if case .responseValidationFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and - /// `underlyingError` properties will contain the associated values. - public var isResponseSerializationError: Bool { - if case .responseSerializationFailed = self { return true } - return false - } -} - -// MARK: - Convenience Properties - -extension AFError { - /// The `URLConvertible` associated with the error. - public var urlConvertible: URLConvertible? { - switch self { - case .invalidURL(let url): - return url - default: - return nil - } - } - - /// The `URL` associated with the error. - public var url: URL? { - switch self { - case .multipartEncodingFailed(let reason): - return reason.url - default: - return nil - } - } - - /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, - /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. - public var underlyingError: Error? { - switch self { - case .parameterEncodingFailed(let reason): - return reason.underlyingError - case .multipartEncodingFailed(let reason): - return reason.underlyingError - case .responseSerializationFailed(let reason): - return reason.underlyingError - default: - return nil - } - } - - /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. - public var acceptableContentTypes: [String]? { - switch self { - case .responseValidationFailed(let reason): - return reason.acceptableContentTypes - default: - return nil - } - } - - /// The response `Content-Type` of a `.responseValidationFailed` error. - public var responseContentType: String? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseContentType - default: - return nil - } - } - - /// The response code of a `.responseValidationFailed` error. - public var responseCode: Int? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseCode - default: - return nil - } - } - - /// The `String.Encoding` associated with a failed `.stringResponse()` call. - public var failedStringEncoding: String.Encoding? { - switch self { - case .responseSerializationFailed(let reason): - return reason.failedStringEncoding - default: - return nil - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var underlyingError: Error? { - switch self { - case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var url: URL? { - switch self { - case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), - .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), - .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), - .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), - .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): - return url - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), - .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.ResponseValidationFailureReason { - var acceptableContentTypes: [String]? { - switch self { - case .missingContentType(let types), .unacceptableContentType(let types, _): - return types - default: - return nil - } - } - - var responseContentType: String? { - switch self { - case .unacceptableContentType(_, let responseType): - return responseType - default: - return nil - } - } - - var responseCode: Int? { - switch self { - case .unacceptableStatusCode(let code): - return code - default: - return nil - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var failedStringEncoding: String.Encoding? { - switch self { - case .stringSerializationFailed(let encoding): - return encoding - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): - return error - default: - return nil - } - } -} - -// MARK: - Error Descriptions - -extension AFError: LocalizedError { - public var errorDescription: String? { - switch self { - case .invalidURL(let url): - return "URL is not valid: \(url)" - case .parameterEncodingFailed(let reason): - return reason.localizedDescription - case .multipartEncodingFailed(let reason): - return reason.localizedDescription - case .responseValidationFailed(let reason): - return reason.localizedDescription - case .responseSerializationFailed(let reason): - return reason.localizedDescription - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var localizedDescription: String { - switch self { - case .missingURL: - return "URL request to encode was missing a URL" - case .jsonEncodingFailed(let error): - return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case .propertyListEncodingFailed(let error): - return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var localizedDescription: String { - switch self { - case .bodyPartURLInvalid(let url): - return "The URL provided is not a file URL: \(url)" - case .bodyPartFilenameInvalid(let url): - return "The URL provided does not have a valid filename: \(url)" - case .bodyPartFileNotReachable(let url): - return "The URL provided is not reachable: \(url)" - case .bodyPartFileNotReachableWithError(let url, let error): - return ( - "The system returned an error while checking the provided URL for " + - "reachability.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartFileIsDirectory(let url): - return "The URL provided is a directory: \(url)" - case .bodyPartFileSizeNotAvailable(let url): - return "Could not fetch the file size from the provided URL: \(url)" - case .bodyPartFileSizeQueryFailedWithError(let url, let error): - return ( - "The system returned an error while attempting to fetch the file size from the " + - "provided URL.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartInputStreamCreationFailed(let url): - return "Failed to create an InputStream for the provided URL: \(url)" - case .outputStreamCreationFailed(let url): - return "Failed to create an OutputStream for URL: \(url)" - case .outputStreamFileAlreadyExists(let url): - return "A file already exists at the provided URL: \(url)" - case .outputStreamURLInvalid(let url): - return "The provided OutputStream URL is invalid: \(url)" - case .outputStreamWriteFailed(let error): - return "OutputStream write failed with error: \(error)" - case .inputStreamReadFailed(let error): - return "InputStream read failed with error: \(error)" - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var localizedDescription: String { - switch self { - case .inputDataNil: - return "Response could not be serialized, input data was nil." - case .inputDataNilOrZeroLength: - return "Response could not be serialized, input data was nil or zero length." - case .inputFileNil: - return "Response could not be serialized, input file was nil." - case .inputFileReadFailed(let url): - return "Response could not be serialized, input file could not be read: \(url)." - case .stringSerializationFailed(let encoding): - return "String could not be serialized with encoding: \(encoding)." - case .jsonSerializationFailed(let error): - return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case .propertyListSerializationFailed(let error): - return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.ResponseValidationFailureReason { - var localizedDescription: String { - switch self { - case .dataFileNil: - return "Response could not be validated, data file was nil." - case .dataFileReadFailed(let url): - return "Response could not be validated, data file could not be read: \(url)." - case .missingContentType(let types): - return ( - "Response Content-Type was missing and acceptable content types " + - "(\(types.joined(separator: ","))) do not match \"*/*\"." - ) - case .unacceptableContentType(let acceptableTypes, let responseType): - return ( - "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + - "\(acceptableTypes.joined(separator: ","))." - ) - case .unacceptableStatusCode(let code): - return "Response status code was unacceptable: \(code)." - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index 20c3672fbaf..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,465 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct -/// URL requests. -public protocol URLConvertible { - /// Returns a URL that conforms to RFC 2396 or throws an `Error`. - /// - /// - throws: An `Error` if the type cannot be converted to a `URL`. - /// - /// - returns: A URL or throws an `Error`. - func asURL() throws -> URL -} - -extension String: URLConvertible { - /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. - /// - /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } - return url - } -} - -extension URL: URLConvertible { - /// Returns self. - public func asURL() throws -> URL { return self } -} - -extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherwise throws an `Error`. - /// - /// - throws: An `AFError.invalidURL` if `url` is `nil`. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = url else { throw AFError.invalidURL(url: self) } - return url - } -} - -// MARK: - - -/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -public protocol URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - /// - /// - throws: An `Error` if the underlying `URLRequest` is `nil`. - /// - /// - returns: A URL request. - func asURLRequest() throws -> URLRequest -} - -extension URLRequestConvertible { - /// The URL request. - public var urlRequest: URLRequest? { return try? asURLRequest() } -} - -extension URLRequest: URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - public func asURLRequest() throws -> URLRequest { return self } -} - -// MARK: - - -extension URLRequest { - /// Creates an instance with the specified `method`, `urlString` and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The new `URLRequest` instance. - public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { - let url = try url.asURL() - - self.init(url: url) - - httpMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - setValue(headerValue, forHTTPHeaderField: headerField) - } - } - } - - func adapt(using adapter: RequestAdapter?) throws -> URLRequest { - guard let adapter = adapter else { return self } - return try adapter.adapt(self) - } -} - -// MARK: - Data Request - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding` and `headers`. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest -{ - return SessionManager.default.request( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest`. -/// -/// - parameter urlRequest: The URL request -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - return SessionManager.default.request(urlRequest) -} - -// MARK: - Download Request - -// MARK: URL Request - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - to: destination - ) -} - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter urlRequest: The URL request. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(urlRequest, to: destination) -} - -// MARK: Resume Data - -/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a -/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken -/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the -/// data is written incorrectly and will always fail to resume the download. For more information about the bug and -/// possible workarounds, please refer to the following Stack Overflow post: -/// -/// - http://stackoverflow.com/a/39347461/1342462 -/// -/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` -/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional -/// information. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(resumingWith: resumeData, to: destination) -} - -// MARK: - Upload Request - -// MARK: File - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) -} - -/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(fileURL, with: urlRequest) -} - -// MARK: Data - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(data, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(data, with: urlRequest) -} - -// MARK: InputStream - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `stream`. -/// -/// - parameter stream: The stream to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(stream, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `stream`. -/// -/// - parameter urlRequest: The URL request. -/// - parameter stream: The stream to upload. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(stream, with: urlRequest) -} - -// MARK: MultipartFormData - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls -/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - to: url, - method: method, - headers: headers, - encodingCompletion: encodingCompletion - ) -} - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and -/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter urlRequest: The URL request. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - encodingCompletion: encodingCompletion - ) -} - -#if !os(watchOS) - -// MARK: - Stream Request - -// MARK: Hostname and Port - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` -/// and `port`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter hostName: The hostname of the server to connect to. -/// - parameter port: The port of the server to connect to. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return SessionManager.default.stream(withHostName: hostName, port: port) -} - -// MARK: NetService - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter netService: The net service used to identify the endpoint. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(with netService: NetService) -> StreamRequest { - return SessionManager.default.stream(with: netService) -} - -#endif diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift deleted file mode 100644 index a54673cca61..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DispatchQueue+Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Dispatch -import Foundation - -extension DispatchQueue { - static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } - static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } - static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } - static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } - - func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { - asyncAfter(deadline: .now() + delay, execute: closure) - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index b840138ccc1..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,580 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(macOS) -import CoreServices -#endif - -/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode -/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead -/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the -/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for -/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -/// -/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well -/// and the w3 form documentation. -/// -/// - https://www.ietf.org/rfc/rfc2388.txt -/// - https://www.ietf.org/rfc/rfc2045.txt -/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -open class MultipartFormData { - - // MARK: - Helper Types - - struct EncodingCharacters { - static let crlf = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case initial, encapsulated, final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { - let boundaryText: String - - switch boundaryType { - case .initial: - boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" - case .encapsulated: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" - case .final: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" - } - - return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - } - - class BodyPart { - let headers: HTTPHeaders - let bodyStream: InputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public var boundary: String - - private var bodyParts: [BodyPart] - private var bodyPartError: AFError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /// Creates a multipart form data object. - /// - /// - returns: The multipart form data object. - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /// - /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - /// information, please refer to the following article: - /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - /// - - self.streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - public func append(_ data: Data, withName name: String) { - let headers = contentHeaders(withName: name) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, mimeType: String) { - let headers = contentHeaders(withName: name, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - /// system associated MIME type. - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - public func append(_ fileURL: URL, withName name: String) { - let fileName = fileURL.lastPathComponent - let pathExtension = fileURL.pathExtension - - if !fileName.isEmpty && !pathExtension.isEmpty { - let mime = mimeType(forPathExtension: pathExtension) - append(fileURL, withName: name, fileName: fileName, mimeType: mime) - } else { - setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) - } - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - /// - Content-Type: #{mimeType} (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.isFileURL else { - setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - do { - let isReachable = try fileURL.checkPromisedItemIsReachable() - guard isReachable else { - setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) - return - } - } catch { - setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - let path = fileURL.path - - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - let bodyContentLength: UInt64 - - do { - guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { - setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) - return - } - - bodyContentLength = fileSize.uint64Value - } - catch { - setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = InputStream(url: fileURL) else { - setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) - return - } - - append(stream, withLength: bodyContentLength, headers: headers) - } - - /// Creates a body part from the stream and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append( - _ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) - { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - HTTP headers - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter headers: The HTTP headers for the body part. - public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /// Encodes all the appended body parts into a single `Data` value. - /// - /// It is important to note that this method will load all the appended body parts into memory all at the same - /// time. This method should only be used when the encoded data will have a small memory footprint. For large data - /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - /// - /// - throws: An `AFError` if encoding encounters an error. - /// - /// - returns: The encoded `Data` if encoding is successful. - public func encode() throws -> Data { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - var encoded = Data() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encode(bodyPart) - encoded.append(encodedData) - } - - return encoded - } - - /// Writes the appended body parts into the given file URL. - /// - /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, - /// this approach is very memory efficient and should be used for large body part data. - /// - /// - parameter fileURL: The file URL to write the multipart form data into. - /// - /// - throws: An `AFError` if encoding encounters an error. - public func writeEncodedData(to fileURL: URL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if FileManager.default.fileExists(atPath: fileURL.path) { - throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) - } else if !fileURL.isFileURL { - throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) - } - - guard let outputStream = OutputStream(url: fileURL, append: false) else { - throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) - } - - outputStream.open() - defer { outputStream.close() } - - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true - - for bodyPart in self.bodyParts { - try write(bodyPart, to: outputStream) - } - } - - // MARK: - Private - Body Part Encoding - - private func encode(_ bodyPart: BodyPart) throws -> Data { - var encoded = Data() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.append(initialData) - - let headerData = encodeHeaders(for: bodyPart) - encoded.append(headerData) - - let bodyStreamData = try encodeBodyStream(for: bodyPart) - encoded.append(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.append(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaders(for bodyPart: BodyPart) -> Data { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.crlf)" - } - headerText += EncodingCharacters.crlf - - return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - - private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { - let inputStream = bodyPart.bodyStream - inputStream.open() - defer { inputStream.close() } - - var encoded = Data() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let error = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - if bytesRead > 0 { - encoded.append(buffer, count: bytesRead) - } else { - break - } - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { - try writeInitialBoundaryData(for: bodyPart, to: outputStream) - try writeHeaderData(for: bodyPart, to: outputStream) - try writeBodyStream(for: bodyPart, to: outputStream) - try writeFinalBoundaryData(for: bodyPart, to: outputStream) - } - - private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try write(initialData, to: outputStream) - } - - private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let headerData = encodeHeaders(for: bodyPart) - return try write(headerData, to: outputStream) - } - - private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let inputStream = bodyPart.bodyStream - - inputStream.open() - defer { inputStream.close() } - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let error = outputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if - let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { - var disposition = "form-data; name=\"\(name)\"" - if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - - var headers = ["Content-Disposition": disposition] - if let mimeType = mimeType { headers["Content-Type"] = mimeType } - - return headers - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { - guard bodyPartError == nil else { return } - bodyPartError = AFError.multipartEncodingFailed(reason: reason) - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index 398ca827c2b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,238 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if !os(watchOS) - -import Foundation -import SystemConfiguration - -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and -/// WiFi network interfaces. -/// -/// Reachability can be used to determine background information about why a network operation failed, or to retry -/// network requests when a connection is established. It should not be used to prevent a user from initiating a network -/// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /// Defines the various states of network reachability. - /// - /// - unknown: It is unknown whether the network is reachable. - /// - notReachable: The network is not reachable. - /// - reachable: The network is reachable. - public enum NetworkReachabilityStatus { - case unknown - case notReachable - case reachable(ConnectionType) - } - - /// Defines the various connection types detected by reachability flags. - /// - /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. - /// - wwan: The connection type is a WWAN connection. - public enum ConnectionType { - case ethernetOrWiFi - case wwan - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = (NetworkReachabilityStatus) -> Void - - // MARK: - Properties - - /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } - - /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .unknown } - return networkReachabilityStatusForFlags(flags) - } - - /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main - - /// A closure executed when the network reachability status changes. - open var listener: Listener? - - open var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - if SCNetworkReachabilityGetFlags(reachability, &flags) { - return flags - } - - return nil - } - - private let reachability: SCNetworkReachability - open var previousFlags: SCNetworkReachabilityFlags - - // MARK: - Initialization - - /// Creates a `NetworkReachabilityManager` instance with the specified host. - /// - /// - parameter host: The host used to evaluate network reachability. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - self.init(reachability: reachability) - } - - /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. - /// - /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - /// status of the device, both IPv4 and IPv6. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?() { - var address = sockaddr_in() - address.sin_len = UInt8(MemoryLayout.size) - address.sin_family = sa_family_t(AF_INET) - - guard let reachability = withUnsafePointer(to: &address, { pointer in - return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { - return SCNetworkReachabilityCreateWithAddress(nil, $0) - } - }) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - - // Set the previous flags to an unreserved value to represent unknown status - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /// Starts listening for changes in network reachability status. - /// - /// - returns: `true` if listening was started successfully, `false` otherwise. - @discardableResult - open func startListening() -> Bool { - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = Unmanaged.passUnretained(self).toOpaque() - - let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() - reachability.notifyListener(flags) - }, - &context - ) - - let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - - listenerQueue.async { - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - - guard let flags = self.flags else { return } - - self.notifyListener(flags) - } - - return callbackEnabled && queueEnabled - } - - /// Stops listening for changes in network reachability status. - open func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - } - - // MARK: - Internal - Listener Notification - - func notifyListener(_ flags: SCNetworkReachabilityFlags) { - guard previousFlags != flags else { return } - previousFlags = flags - - listener?(networkReachabilityStatusForFlags(flags)) - } - - // MARK: - Internal - Network Reachability Status - - func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard isNetworkReachable(with: flags) else { return .notReachable } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif - - return networkStatus - } - - func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { - let isReachable = flags.contains(.reachable) - let needsConnection = flags.contains(.connectionRequired) - let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) - let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - - return isReachable && (!needsConnection || canConnectWithoutUserInteraction) - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -/// Returns whether the two network reachability status values are equal. -/// -/// - parameter lhs: The left-hand side value to compare. -/// - parameter rhs: The right-hand side value to compare. -/// -/// - returns: `true` if the two values are equal, `false` otherwise. -public func ==( - lhs: NetworkReachabilityManager.NetworkReachabilityStatus, - rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ - switch (lhs, rhs) { - case (.unknown, .unknown): - return true - case (.notReachable, .notReachable): - return true - case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): - return lhsConnectionType == rhsConnectionType - default: - return false - } -} - -#endif diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index e1ac31bf327..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Notification.Name { - /// Used as a namespace for all `URLSessionTask` related notifications. - public struct Task { - /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. - public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") - - /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. - public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") - - /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. - public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") - - /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. - public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") - } -} - -// MARK: - - -extension Notification { - /// Used as a namespace for all `Notification` user info dictionary keys. - public struct Key { - /// User info dictionary key representing the `URLSessionTask` associated with the notification. - public static let Task = "org.alamofire.notification.key.task" - - /// User info dictionary key representing the responseData associated with the notification. - public static let ResponseData = "org.alamofire.notification.key.responseData" - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index 6195809c5db..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,483 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// HTTP method definitions. -/// -/// See https://tools.ietf.org/html/rfc7231#section-4.3 -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -// MARK: - - -/// A dictionary of parameters to apply to a `URLRequest`. -public typealias Parameters = [String: Any] - -/// A type used to define how a set of parameters are applied to a `URLRequest`. -public protocol ParameterEncoding { - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. - /// - /// - returns: The encoded request. - func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest -} - -// MARK: - - -/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP -/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as -/// the HTTP body depends on the destination of the encoding. -/// -/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// There is no published specification for how to encode collection types. By default the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -public struct URLEncoding: ParameterEncoding { - - // MARK: Helper Types - - /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the - /// resulting URL request. - /// - /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` - /// requests and sets as the HTTP body for requests with any other HTTP method. - /// - queryString: Sets or appends encoded query string result to existing query string. - /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. - public enum Destination { - case methodDependent, queryString, httpBody - } - - /// Configures how `Array` parameters are encoded. - /// - /// - brackets: An empty set of square brackets is appended to the key for every value. - /// This is the default behavior. - /// - noBrackets: No brackets are appended. The key is encoded as is. - public enum ArrayEncoding { - case brackets, noBrackets - - func encode(key: String) -> String { - switch self { - case .brackets: - return "\(key)[]" - case .noBrackets: - return key - } - } - } - - /// Configures how `Bool` parameters are encoded. - /// - /// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior. - /// - literal: Encode `true` and `false` as string literals. - public enum BoolEncoding { - case numeric, literal - - func encode(value: Bool) -> String { - switch self { - case .numeric: - return value ? "1" : "0" - case .literal: - return value ? "true" : "false" - } - } - } - - // MARK: Properties - - /// Returns a default `URLEncoding` instance. - public static var `default`: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.methodDependent` destination. - public static var methodDependent: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.queryString` destination. - public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - - /// Returns a `URLEncoding` instance with an `.httpBody` destination. - public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - - /// The destination defining where the encoded query string is to be applied to the URL request. - public let destination: Destination - - /// The encoding to use for `Array` parameters. - public let arrayEncoding: ArrayEncoding - - /// The encoding to use for `Bool` parameters. - public let boolEncoding: BoolEncoding - - // MARK: Initialization - - /// Creates a `URLEncoding` instance using the specified destination. - /// - /// - parameter destination: The destination defining where the encoded query string is to be applied. - /// - parameter arrayEncoding: The encoding to use for `Array` parameters. - /// - parameter boolEncoding: The encoding to use for `Bool` parameters. - /// - /// - returns: The new `URLEncoding` instance. - public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) { - self.destination = destination - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { - guard let url = urlRequest.url else { - throw AFError.parameterEncodingFailed(reason: .missingURL) - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - urlComponents.percentEncodedQuery = percentEncodedQuery - urlRequest.url = urlComponents.url - } - } else { - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) - } - - return urlRequest - } - - /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - /// - /// - parameter key: The key of the query component. - /// - parameter value: The value of the query component. - /// - /// - returns: The percent-escaped, URL encoded query string components. - public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: Any] { - for (nestedKey, value) in dictionary { - components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) - } - } else if let array = value as? [Any] { - for value in array { - components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) - } - } else if let value = value as? NSNumber { - if value.isBool { - components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - } else if let bool = value as? Bool { - components.append((escape(key), escape(boolEncoding.encode(value: bool)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /// Returns a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - /// should be percent-escaped in the query string. - /// - /// - parameter string: The string to be percent-escaped. - /// - /// - returns: The percent-escaped string. - public func escape(_ string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - var allowedCharacterSet = CharacterSet.urlQueryAllowed - allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, *) { - escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex - let range = startIndex.. String { - var components: [(String, String)] = [] - - for key in parameters.keys.sorted(by: <) { - let value = parameters[key]! - components += queryComponents(fromKey: key, value: value) - } - return components.map { "\($0)=\($1)" }.joined(separator: "&") - } - - private func encodesParametersInURL(with method: HTTPMethod) -> Bool { - switch destination { - case .queryString: - return true - case .httpBody: - return false - default: - break - } - - switch method { - case .get, .head, .delete: - return true - default: - return false - } - } -} - -// MARK: - - -/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the -/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -public struct JSONEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a `JSONEncoding` instance with default writing options. - public static var `default`: JSONEncoding { return JSONEncoding() } - - /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. - public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } - - /// The options for writing the parameters as JSON data. - public let options: JSONSerialization.WritingOptions - - // MARK: Initialization - - /// Creates a `JSONEncoding` instance using the specified options. - /// - /// - parameter options: The options for writing the parameters as JSON data. - /// - /// - returns: The new `JSONEncoding` instance. - public init(options: JSONSerialization.WritingOptions = []) { - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: parameters, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } - - /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. - /// - /// - parameter urlRequest: The request to apply the JSON object to. - /// - parameter jsonObject: The JSON object to apply to the request. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonObject = jsonObject else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the -/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header -/// field of an encoded request is set to `application/x-plist`. -public struct PropertyListEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a default `PropertyListEncoding` instance. - public static var `default`: PropertyListEncoding { return PropertyListEncoding() } - - /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. - public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } - - /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. - public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } - - /// The property list serialization format. - public let format: PropertyListSerialization.PropertyListFormat - - /// The options for writing the parameters as plist data. - public let options: PropertyListSerialization.WriteOptions - - // MARK: Initialization - - /// Creates a `PropertyListEncoding` instance using the specified format and options. - /// - /// - parameter format: The property list serialization format. - /// - parameter options: The options for writing the parameters as plist data. - /// - /// - returns: The new `PropertyListEncoding` instance. - public init( - format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { - self.format = format - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try PropertyListSerialization.data( - fromPropertyList: parameters, - format: format, - options: options - ) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -extension NSNumber { - fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index 2be2ce0106f..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,660 +0,0 @@ -// -// Request.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. -public protocol RequestAdapter { - /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. - /// - /// - parameter urlRequest: The URL request to adapt. - /// - /// - throws: An `Error` if the adaptation encounters an error. - /// - /// - returns: The adapted `URLRequest`. - func adapt(_ urlRequest: URLRequest) throws -> URLRequest -} - -// MARK: - - -/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. -public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void - -/// A type that determines whether a request should be retried after being executed by the specified session manager -/// and encountering an error. -public protocol RequestRetrier { - /// Determines whether the `Request` should be retried by calling the `completion` closure. - /// - /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs - /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly - /// cleaned up after. - /// - /// - parameter manager: The session manager the request was executed on. - /// - parameter request: The request that failed due to the encountered error. - /// - parameter error: The error encountered when executing the request. - /// - parameter completion: The completion closure to be executed when retry decision has been determined. - func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) -} - -// MARK: - - -protocol TaskConvertible { - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask -} - -/// A dictionary of headers to apply to a `URLRequest`. -public typealias HTTPHeaders = [String: String] - -// MARK: - - -/// Responsible for sending a request and receiving the response and associated data from the server, as well as -/// managing its underlying `URLSessionTask`. -open class Request { - - // MARK: Helper Types - - /// A closure executed when monitoring upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void - - enum RequestTask { - case data(TaskConvertible?, URLSessionTask?) - case download(TaskConvertible?, URLSessionTask?) - case upload(TaskConvertible?, URLSessionTask?) - case stream(TaskConvertible?, URLSessionTask?) - } - - // MARK: Properties - - /// The delegate for the underlying task. - open internal(set) var delegate: TaskDelegate { - get { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - return taskDelegate - } - set { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - taskDelegate = newValue - } - } - - /// The underlying task. - open var task: URLSessionTask? { return delegate.task } - - /// The session belonging to the underlying task. - public let session: URLSession - - /// The request sent or to be sent to the server. - open var request: URLRequest? { return task?.originalRequest } - - /// The response received from the server, if any. - open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } - - /// The number of times the request has been retried. - open internal(set) var retryCount: UInt = 0 - - let originalTask: TaskConvertible? - - var startTime: CFAbsoluteTime? - var endTime: CFAbsoluteTime? - - var validations: [() -> Void] = [] - - private var taskDelegate: TaskDelegate - private var taskDelegateLock = NSLock() - - // MARK: Lifecycle - - init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { - self.session = session - - switch requestTask { - case .data(let originalTask, let task): - taskDelegate = DataTaskDelegate(task: task) - self.originalTask = originalTask - case .download(let originalTask, let task): - taskDelegate = DownloadTaskDelegate(task: task) - self.originalTask = originalTask - case .upload(let originalTask, let task): - taskDelegate = UploadTaskDelegate(task: task) - self.originalTask = originalTask - case .stream(let originalTask, let task): - taskDelegate = TaskDelegate(task: task) - self.originalTask = originalTask - } - - delegate.error = error - delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } - } - - // MARK: Authentication - - /// Associates an HTTP Basic credential with the request. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - parameter persistence: The URL credential persistence. `.ForSession` by default. - /// - /// - returns: The request. - @discardableResult - open func authenticate( - user: String, - password: String, - persistence: URLCredential.Persistence = .forSession) - -> Self - { - let credential = URLCredential(user: user, password: password, persistence: persistence) - return authenticate(usingCredential: credential) - } - - /// Associates a specified credential with the request. - /// - /// - parameter credential: The credential. - /// - /// - returns: The request. - @discardableResult - open func authenticate(usingCredential credential: URLCredential) -> Self { - delegate.credential = credential - return self - } - - /// Returns a base64 encoded basic authentication credential as an authorization header tuple. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. - open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { - guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } - - let credential = data.base64EncodedString(options: []) - - return (key: "Authorization", value: "Basic \(credential)") - } - - // MARK: State - - /// Resumes the request. - open func resume() { - guard let task = task else { delegate.queue.isSuspended = false ; return } - - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - task.resume() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidResume, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Suspends the request. - open func suspend() { - guard let task = task else { return } - - task.suspend() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidSuspend, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Cancels the request. - open func cancel() { - guard let task = task else { return } - - task.cancel() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } -} - -// MARK: - CustomStringConvertible - -extension Request: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as - /// well as the response status code if a response has been received. - open var description: String { - var components: [String] = [] - - if let HTTPMethod = request?.httpMethod { - components.append(HTTPMethod) - } - - if let urlString = request?.url?.absoluteString { - components.append(urlString) - } - - if let response = response { - components.append("(\(response.statusCode))") - } - - return components.joined(separator: " ") - } -} - -// MARK: - CustomDebugStringConvertible - -extension Request: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, in the form of a cURL command. - open var debugDescription: String { - return cURLRepresentation() - } - - func cURLRepresentation() -> String { - var components = ["$ curl -v"] - - guard let request = self.request, - let url = request.url, - let host = url.host - else { - return "$ curl command could not be created" - } - - if let httpMethod = request.httpMethod, httpMethod != "GET" { - components.append("-X \(httpMethod)") - } - - if let credentialStorage = self.session.configuration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace( - host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) - - if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { - for credential in credentials { - guard let user = credential.user, let password = credential.password else { continue } - components.append("-u \(user):\(password)") - } - } else { - if let credential = delegate.credential, let user = credential.user, let password = credential.password { - components.append("-u \(user):\(password)") - } - } - } - - if session.configuration.httpShouldSetCookies { - if - let cookieStorage = session.configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } - - #if swift(>=3.2) - components.append("-b \"\(string[.. URLSessionTask { - do { - let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.sync { session.dataTask(with: urlRequest) } - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - if let requestable = originalTask as? Requestable { return requestable.urlRequest } - - return nil - } - - /// The progress of fetching the response data from the server for the request. - open var progress: Progress { return dataDelegate.progress } - - var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } - - // MARK: Stream - - /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. - /// - /// This closure returns the bytes most recently received from the server, not including data from previous calls. - /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - /// also important to note that the server data in any `Response` object will be `nil`. - /// - /// - parameter closure: The code to be executed periodically during the lifecycle of the request. - /// - /// - returns: The request. - @discardableResult - open func stream(closure: ((Data) -> Void)? = nil) -> Self { - dataDelegate.dataStream = closure - return self - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - dataDelegate.progressHandler = (closure, queue) - return self - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. -open class DownloadRequest: Request { - - // MARK: Helper Types - - /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the - /// destination URL. - public struct DownloadOptions: OptionSet { - /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. - public let rawValue: UInt - - /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. - public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - - /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. - public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - - /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. - /// - /// - parameter rawValue: The raw bitmask value for the option. - /// - /// - returns: A new log level instance. - public init(rawValue: UInt) { - self.rawValue = rawValue - } - } - - /// A closure executed once a download request has successfully completed in order to determine where to move the - /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL - /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and - /// the options defining how the file should be moved. - public typealias DownloadFileDestination = ( - _ temporaryURL: URL, - _ response: HTTPURLResponse) - -> (destinationURL: URL, options: DownloadOptions) - - enum Downloadable: TaskConvertible { - case request(URLRequest) - case resumeData(Data) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .request(urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.downloadTask(with: urlRequest) } - case let .resumeData(resumeData): - task = queue.sync { session.downloadTask(withResumeData: resumeData) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { - return urlRequest - } - - return nil - } - - /// The resume data of the underlying download task if available after a failure. - open var resumeData: Data? { return downloadDelegate.resumeData } - - /// The progress of downloading the response data from the server for the request. - open var progress: Progress { return downloadDelegate.progress } - - var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } - - // MARK: State - - /// Cancels the request. - override open func cancel() { - cancel(createResumeData: true) - } - - /// Cancels the request. - /// - /// - parameter createResumeData: Determines whether resume data is created via the underlying download task or not. - open func cancel(createResumeData: Bool) { - if createResumeData { - downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } - } else { - downloadDelegate.downloadTask.cancel() - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task as Any] - ) - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - downloadDelegate.progressHandler = (closure, queue) - return self - } - - // MARK: Destination - - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. - /// - /// - parameter directory: The search path directory. `.DocumentDirectory` by default. - /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. - /// - /// - returns: A download file destination closure. - open class func suggestedDownloadDestination( - for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) - - if !directoryURLs.isEmpty { - return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) - } - - return (temporaryURL, []) - } - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. -open class UploadRequest: DataRequest { - - // MARK: Helper Types - - enum Uploadable: TaskConvertible { - case data(Data, URLRequest) - case file(URL, URLRequest) - case stream(InputStream, URLRequest) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .data(data, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, from: data) } - case let .file(url, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } - case let .stream(_, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - guard let uploadable = originalTask as? Uploadable else { return nil } - - switch uploadable { - case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): - return urlRequest - } - } - - /// The progress of uploading the payload to the server for the upload request. - open var uploadProgress: Progress { return uploadDelegate.uploadProgress } - - var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } - - // MARK: Upload Progress - - /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to - /// the server. - /// - /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress - /// of data being read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is sent to the server. - /// - /// - returns: The request. - @discardableResult - open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - uploadDelegate.uploadProgressHandler = (closure, queue) - return self - } -} - -// MARK: - - -#if !os(watchOS) - -/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -open class StreamRequest: Request { - enum Streamable: TaskConvertible { - case stream(hostName: String, port: Int) - case netService(NetService) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask - - switch self { - case let .stream(hostName, port): - task = queue.sync { session.streamTask(withHostName: hostName, port: port) } - case let .netService(netService): - task = queue.sync { session.streamTask(with: netService) } - } - - return task - } - } -} - -#endif diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 747a471a55b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,567 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to store all data associated with an non-serialized response of a data or upload request. -public struct DefaultDataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDataResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - data: The data returned by the server. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.data = data - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a data or upload request. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter data: The data returned by the server. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DataResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.data = data - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data, the response serialization result and the timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DataResponse { - /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result - /// value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's - /// result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -/// Used to store all data associated with an non-serialized response of a download request. -public struct DefaultDownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDownloadResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - temporaryURL: The temporary destination URL of the data returned from the server. - /// - destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - resumeData: The resume data generated if the request was cancelled. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. - /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - parameter resumeData: The resume data generated if the request was cancelled. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DownloadResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the response serialization result and the - /// timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") - output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") - output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DownloadResponse { - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this - /// instance's result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -protocol Response { - /// The task metrics containing the request / response statistics. - var _metrics: AnyObject? { get set } - mutating func add(_ metrics: AnyObject?) -} - -extension Response { - mutating func add(_ metrics: AnyObject?) { - #if !os(watchOS) - guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } - guard let metrics = metrics as? URLSessionTaskMetrics else { return } - - _metrics = metrics - #endif - } -} - -// MARK: - - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 9cc105a8205..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,715 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The type in which all data response serializers must conform to in order to serialize a response. -public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DataResponseSerializer: DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - - -/// The type in which all download response serializers must conform to in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - Timeline - -extension Request { - var timeline: Timeline { - let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - return Timeline( - requestStartTime: requestStartTime, - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - } -} - -// MARK: - Default - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var dataResponse = DefaultDataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - error: self.delegate.error, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - completionHandler(dataResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - var dataResponse = DataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } - } - - return self - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var downloadResponse = DefaultDownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - error: self.downloadDelegate.error, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - completionHandler(downloadResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data contained in the destination url. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.downloadDelegate.fileURL, - self.downloadDelegate.error - ) - - var downloadResponse = DownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - result: result, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } - } - - return self - } -} - -// MARK: - Data - -extension Request { - /// Returns a result data type that contains the response data as-is. - /// - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - return .success(validData) - } -} - -extension DataRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseData(response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseData(response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -// MARK: - String - -extension Request { - /// Returns a result string type initialized from the response data with the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseString( - encoding: String.Encoding?, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName)) - ) - } - - let actualEncoding = convertedEncoding ?? .isoLatin1 - - if let string = String(data: validData, encoding: actualEncoding) { - return .success(string) - } else { - return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -// MARK: - JSON - -extension Request { - /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` - /// with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseJSON( - options: JSONSerialization.ReadingOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let json = try JSONSerialization.jsonObject(with: validData, options: options) - return .success(json) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -// MARK: - Property List - -extension Request { - /// Returns a plist object contained in a result type constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponsePropertyList( - options: PropertyListSerialization.ReadOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) - return .success(plist) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -/// A set of HTTP response status code that do not contain response data. -private let emptyDataStatusCodes: Set = [204, 205] diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index e0928089ab7..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,300 +0,0 @@ -// -// Result.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to represent whether a request was successful or encountered an error. -/// -/// - success: The request and all post processing operations were successful resulting in the serialization of the -/// provided associated value. -/// -/// - failure: The request encountered an error resulting in a failure. The associated values are the original data -/// provided by the server as well as the error that caused the failure. -public enum Result { - case success(Value) - case failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .success: - return true - case .failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .success(let value): - return value - case .failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .success: - return nil - case .failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .success: - return "SUCCESS" - case .failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .success(let value): - return "SUCCESS: \(value)" - case .failure(let error): - return "FAILURE: \(error)" - } - } -} - -// MARK: - Functional APIs - -extension Result { - /// Creates a `Result` instance from the result of a closure. - /// - /// A failure result is created when the closure throws, and a success result is created when the closure - /// succeeds without throwing an error. - /// - /// func someString() throws -> String { ... } - /// - /// let result = Result(value: { - /// return try someString() - /// }) - /// - /// // The type of result is Result - /// - /// The trailing closure syntax is also supported: - /// - /// let result = Result { try someString() } - /// - /// - parameter value: The closure to execute and create the result for. - public init(value: () throws -> Value) { - do { - self = try .success(value()) - } catch { - self = .failure(error) - } - } - - /// Returns the success value, or throws the failure error. - /// - /// let possibleString: Result = .success("success") - /// try print(possibleString.unwrap()) - /// // Prints "success" - /// - /// let noString: Result = .failure(error) - /// try print(noString.unwrap()) - /// // Throws error - public func unwrap() throws -> Value { - switch self { - case .success(let value): - return value - case .failure(let error): - throw error - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: Result = .success(Data()) - /// let possibleInt = possibleData.map { $0.count } - /// try print(possibleInt.unwrap()) - /// // Prints "0" - /// - /// let noData: Result = .failure(error) - /// let noInt = noData.map { $0.count } - /// try print(noInt.unwrap()) - /// // Throws error - /// - /// - parameter transform: A closure that takes the success value of the `Result` instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func map(_ transform: (Value) -> T) -> Result { - switch self { - case .success(let value): - return .success(transform(value)) - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func flatMap(_ transform: (Value) throws -> T) -> Result { - switch self { - case .success(let value): - do { - return try .success(transform(value)) - } catch { - return .failure(error) - } - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: Result = .failure(someError) - /// let withMyError: Result = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func mapError(_ transform: (Error) -> T) -> Result { - switch self { - case .failure(let error): - return .failure(transform(error)) - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func flatMapError(_ transform: (Error) throws -> T) -> Result { - switch self { - case .failure(let error): - do { - return try .failure(transform(error)) - } catch { - return .failure(error) - } - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withValue(_ closure: (Value) throws -> Void) rethrows -> Result { - if case let .success(value) = self { try closure(value) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withError(_ closure: (Error) throws -> Void) rethrows -> Result { - if case let .failure(error) = self { try closure(error) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a success. - /// - /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifSuccess(_ closure: () throws -> Void) rethrows -> Result { - if isSuccess { try closure() } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure. - /// - /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifFailure(_ closure: () throws -> Void) rethrows -> Result { - if isFailure { try closure() } - - return self - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index dea099e257a..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,307 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -open class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /// Initializes the `ServerTrustPolicyManager` instance with the given policies. - /// - /// Since different servers and web services can have different leaf certificates, intermediate and even root - /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - /// pinning for host3 and disabling evaluation for host4. - /// - /// - parameter policies: A dictionary of all policies mapped to a particular host. - /// - /// - returns: The new `ServerTrustPolicyManager` instance. - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /// Returns the `ServerTrustPolicy` for the given host if applicable. - /// - /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override - /// this method and implement more complex mapping implementations such as wildcards. - /// - /// - parameter host: The host to use when searching for a matching policy. - /// - /// - returns: The server trust policy for the given host if found. - open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension URLSession { - private struct AssociatedKeys { - static var managerKey = "URLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when -/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust -/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. -/// -/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other -/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged -/// to route all communication over an HTTPS connection with pinning enabled. -/// -/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to -/// validate the host provided by the challenge. Applications are encouraged to always -/// validate the host in production environments to guarantee the validity of the server's -/// certificate chain. -/// -/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to -/// validate the host provided by the challenge as well as specify the revocation flags for -/// testing for revoked certificates. Apple platforms did not start testing for revoked -/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is -/// demonstrated in our TLS tests. Applications are encouraged to always validate the host -/// in production environments to guarantee the validity of the server's certificate chain. -/// -/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is -/// considered valid if one of the pinned certificates match one of the server certificates. -/// By validating both the certificate chain and host, certificate pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered -/// valid if one of the pinned public keys match one of the server certificate public keys. -/// By validating both the certificate chain and host, public key pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. -public enum ServerTrustPolicy { - case performDefaultEvaluation(validateHost: Bool) - case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) - case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case disableEvaluation - case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) - - // MARK: - Bundle Location - - /// Returns all certificates within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `.cer` files. - /// - /// - returns: All certificates within the given bundle. - public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) - }.joined()) - - for path in paths { - if - let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, - let certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /// Returns all public keys within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `*.cer` files. - /// - /// - returns: All public keys within the given bundle. - public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificates(in: bundle) { - if let publicKey = publicKey(for: certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /// Evaluates whether the server trust is valid for the given host. - /// - /// - parameter serverTrust: The server trust to evaluate. - /// - parameter host: The host of the challenge protection space. - /// - /// - returns: Whether the server trust is valid. - public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .performDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .performRevokedEvaluation(validateHost, revocationFlags): - let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) - SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateData(for: serverTrust) - let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData == pinnedCertificateData { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .disableEvaluation: - serverTrustIsValid = true - case let .customEvaluation(closure): - serverTrustIsValid = closure(serverTrust, host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(_ trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType.invalid - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType.unspecified - let proceed = SecTrustResultType.proceed - - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateData(for trust: SecTrust) -> [Data] { - var certificates: [SecCertificate] = [] - - for index in 0.. [Data] { - return certificates.map { SecCertificateCopyData($0) as Data } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeys(for trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust, trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift deleted file mode 100644 index 4964f1eebfd..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ /dev/null @@ -1,725 +0,0 @@ -// -// SessionDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for handling all delegate callbacks for the underlying session. -open class SessionDelegate: NSObject { - - // MARK: URLSessionDelegate Overrides - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. - open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. - open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. - open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? - - // MARK: URLSessionTaskDelegate Overrides - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. - open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. - open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. - open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and - /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. - open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. - open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? - - // MARK: URLSessionDataDelegate Overrides - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. - open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. - open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. - open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. - open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? - - // MARK: URLSessionDownloadDelegate Overrides - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. - open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. - open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. - open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: URLSessionStreamDelegate Overrides - -#if !os(watchOS) - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - -#endif - - // MARK: Properties - - var retrier: RequestRetrier? - weak var sessionManager: SessionManager? - - var requests: [Int: Request] = [:] - private let lock = NSLock() - - /// Access the task delegate for the specified task in a thread-safe manner. - open subscript(task: URLSessionTask) -> Request? { - get { - lock.lock() ; defer { lock.unlock() } - return requests[task.taskIdentifier] - } - set { - lock.lock() ; defer { lock.unlock() } - requests[task.taskIdentifier] = newValue - } - } - - // MARK: Lifecycle - - /// Initializes the `SessionDelegate` instance. - /// - /// - returns: The new `SessionDelegate` instance. - public override init() { - super.init() - } - - // MARK: NSObject Overrides - - /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond - /// to a specified message. - /// - /// - parameter selector: A selector that identifies a message. - /// - /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. - open override func responds(to selector: Selector) -> Bool { - #if !os(macOS) - if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil - } - #endif - - #if !os(watchOS) - if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { - switch selector { - case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): - return streamTaskReadClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): - return streamTaskWriteClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): - return streamTaskBetterRouteDiscovered != nil - case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): - return streamTaskDidBecomeInputAndOutputStreams != nil - default: - break - } - } - #endif - - switch selector { - case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return type(of: self).instancesRespond(to: selector) - } - } -} - -// MARK: - URLSessionDelegate - -extension SessionDelegate: URLSessionDelegate { - /// Tells the delegate that the session has been invalidated. - /// - /// - parameter session: The session object that was invalidated. - /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /// Requests credentials from the delegate in response to a session-level authentication request from the - /// remote server. - /// - /// - parameter session: The session containing the task that requested authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return - } - - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - -#if !os(macOS) - - /// Tells the delegate that all messages enqueued for a session have been delivered. - /// - /// - parameter session: The session that no longer has any outstanding requests. - open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - -#endif -} - -// MARK: - URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Tells the delegate that the remote server requested an HTTP redirect. - /// - /// - parameter session: The session containing the task whose request resulted in a redirect. - /// - parameter task: The task whose request resulted in a redirect. - /// - parameter response: An object containing the server’s response to the original request. - /// - parameter request: A URL request object filled out with the new location. - /// - parameter completionHandler: A closure that your handler should call with either the value of the request - /// parameter, a modified URL request object, or NULL to refuse the redirect and - /// return the body of the redirect response. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /// Requests credentials from the delegate in response to an authentication request from the remote server. - /// - /// - parameter session: The session containing the task whose request requires authentication. - /// - parameter task: The task whose request requires authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task]?.delegate { - delegate.urlSession( - session, - task: task, - didReceive: challenge, - completionHandler: completionHandler - ) - } else { - urlSession(session, didReceive: challenge, completionHandler: completionHandler) - } - } - - /// Tells the delegate when a task requires a new request body stream to send to the remote server. - /// - /// - parameter session: The session containing the task that needs a new body stream. - /// - parameter task: The task that needs a new body stream. - /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task]?.delegate { - delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /// Periodically informs the delegate of the progress of sending body content to the server. - /// - /// - parameter session: The session containing the data task. - /// - parameter task: The data task. - /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - /// - parameter totalBytesSent: The total number of bytes sent so far. - /// - parameter totalBytesExpectedToSend: The expected length of the body data. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - -#if !os(watchOS) - - /// Tells the delegate that the session finished collecting metrics for the task. - /// - /// - parameter session: The session collecting the metrics. - /// - parameter task: The task whose metrics have been collected. - /// - parameter metrics: The collected metrics. - @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) - @objc(URLSession:task:didFinishCollectingMetrics:) - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - self[task]?.delegate.metrics = metrics - } - -#endif - - /// Tells the delegate that the task finished transferring data. - /// - /// - parameter session: The session containing the task whose request finished transferring data. - /// - parameter task: The task whose request finished transferring data. - /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - /// Executed after it is determined that the request is not going to be retried - let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in - guard let strongSelf = self else { return } - - strongSelf.taskDidComplete?(session, task, error) - - strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) - - var userInfo: [String: Any] = [Notification.Key.Task: task] - - if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data { - userInfo[Notification.Key.ResponseData] = data - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidComplete, - object: strongSelf, - userInfo: userInfo - ) - - strongSelf[task] = nil - } - - guard let request = self[task], let sessionManager = sessionManager else { - completeTask(session, task, error) - return - } - - // Run all validations on the request before checking if an error occurred - request.validations.forEach { $0() } - - // Determine whether an error has occurred - var error: Error? = error - - if request.delegate.error != nil { - error = request.delegate.error - } - - /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request - /// should be retried. Otherwise, complete the task by notifying the task delegate. - if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in - guard shouldRetry else { completeTask(session, task, error) ; return } - - DispatchQueue.utility.after(timeDelay) { [weak self] in - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false - - if retrySucceeded, let task = request.task { - strongSelf[task] = request - return - } else { - completeTask(session, task, error) - } - } - } - } else { - completeTask(session, task, error) - } - } -} - -// MARK: - URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - /// Tells the delegate that the data task received the initial reply (headers) from the server. - /// - /// - parameter session: The session containing the data task that received an initial reply. - /// - parameter dataTask: The data task that received an initial reply. - /// - parameter response: A URL response object populated with headers. - /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - /// constant to indicate whether the transfer should continue as a data task or - /// should become a download task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } - - var disposition: URLSession.ResponseDisposition = .allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /// Tells the delegate that the data task was changed to a download task. - /// - /// - parameter session: The session containing the task that was replaced by a download task. - /// - parameter dataTask: The data task that was replaced by a download task. - /// - parameter downloadTask: The new download task that replaced the data task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) - } - } - - /// Tells the delegate that the data task has received some of the expected data. - /// - /// - parameter session: The session containing the data task that provided data. - /// - parameter dataTask: The data task that provided data. - /// - parameter data: A data object containing the transferred data. - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession(session, dataTask: dataTask, didReceive: data) - } - } - - /// Asks the delegate whether the data (or upload) task should store the response in the cache. - /// - /// - parameter session: The session containing the data (or upload) task. - /// - parameter dataTask: The data (or upload) task. - /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - /// caching policy and the values of certain received headers, such as the Pragma - /// and Cache-Control headers. - /// - parameter completionHandler: A block that your handler must call, providing either the original proposed - /// response, a modified version of that response, or NULL to prevent caching the - /// response. If your delegate implements this method, it must call this completion - /// handler; otherwise, your app leaks memory. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return - } - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } -} - -// MARK: - URLSessionDownloadDelegate - -extension SessionDelegate: URLSessionDownloadDelegate { - /// Tells the delegate that a download task has finished downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that finished. - /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - /// open the file for reading or move it to a permanent location in your app’s sandbox - /// container directory before returning from this delegate method. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - } - } - - /// Periodically informs the delegate about the download’s progress. - /// - /// - parameter session: The session containing the download task. - /// - parameter downloadTask: The download task. - /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate - /// method was called. - /// - parameter totalBytesWritten: The total number of bytes transferred so far. - /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - /// header. If this header was not provided, the value is - /// `NSURLSessionTransferSizeUnknown`. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /// Tells the delegate that the download task has resumed downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. - /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - /// existing content, then this value is zero. Otherwise, this value is an - /// integer representing the number of bytes on disk that do not need to be - /// retrieved again. - /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } -} - -// MARK: - URLSessionStreamDelegate - -#if !os(watchOS) - -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -extension SessionDelegate: URLSessionStreamDelegate { - /// Tells the delegate that the read side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /// Tells the delegate that the write side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /// Tells the delegate that the system has determined that a better route to the host is available. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - /// - parameter inputStream: The new input stream. - /// - parameter outputStream: The new output stream. - open func urlSession( - _ session: URLSession, - streamTask: URLSessionStreamTask, - didBecome inputStream: InputStream, - outputStream: OutputStream) - { - streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift deleted file mode 100644 index 02c36a76b7b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ /dev/null @@ -1,899 +0,0 @@ -// -// SessionManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -open class SessionManager { - - // MARK: - Helper Types - - /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - /// associated values. - /// - /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with - /// streaming information. - /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - /// error. - public enum MultipartFormDataEncodingResult { - case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) - case failure(Error) - } - - // MARK: - Properties - - /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use - /// directly for any ad hoc requests. - public static let `default`: SessionManager = { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders - - return SessionManager(configuration: configuration) - }() - - /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - public static let defaultHTTPHeaders: HTTPHeaders = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joined(separator: ", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` - let userAgent: String = { - if let info = Bundle.main.infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let version = ProcessInfo.processInfo.operatingSystemVersion - let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(macOS) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion: String = { - guard - let afInfo = Bundle(for: SessionManager.self).infoDictionary, - let build = afInfo["CFBundleShortVersionString"] - else { return "Unknown" } - - return "Alamofire/\(build)" - }() - - return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - /// Default memory threshold used when encoding `MultipartFormData` in bytes. - public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 - - /// The underlying session. - public let session: URLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - open var startRequestsImmediately: Bool = true - - /// The request adapter called each time a new request is created. - open var adapter: RequestAdapter? - - /// The request retrier called each time a request encounters an error to determine whether to retry the request. - open var retrier: RequestRetrier? { - get { return delegate.retrier } - set { delegate.retrier = newValue } - } - - /// The background completion handler closure provided by the UIApplicationDelegate - /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - /// will automatically call the handler. - /// - /// If you need to handle your own events before the handler is called, then you need to override the - /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - /// - /// `nil` by default. - open var backgroundCompletionHandler: (() -> Void)? - - let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) - - // MARK: - Lifecycle - - /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter configuration: The configuration used to construct the managed session. - /// `URLSessionConfiguration.default` by default. - /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - /// default. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance. - public init( - configuration: URLSessionConfiguration = URLSessionConfiguration.default, - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter session: The URL session. - /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. - public init?( - session: URLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionManager = self - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Data Request - - /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` - /// and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest - { - var originalRequest: URLRequest? - - do { - originalRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) - return request(encodedURLRequest) - } catch { - return request(originalRequest, failedWith: error) - } - } - - /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - var originalRequest: URLRequest? - - do { - originalRequest = try urlRequest.asURLRequest() - let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) - - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - let request = DataRequest(session: session, requestTask: .data(originalTask, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return request(originalRequest, failedWith: error) - } - } - - // MARK: Private - Request Implementation - - private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { - var requestTask: Request.RequestTask = .data(nil, nil) - - if let urlRequest = urlRequest { - let originalTask = DataRequest.Requestable(urlRequest: urlRequest) - requestTask = .data(originalTask, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: request, with: underlyingError) - } else { - if startRequestsImmediately { request.resume() } - } - - return request - } - - // MARK: - Download Request - - // MARK: URL Request - - /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, - /// `headers` and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) - return download(encodedURLRequest, to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save - /// them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try urlRequest.asURLRequest() - return download(.request(urlRequest), to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - // MARK: Resume Data - - /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve - /// the contents of the original request and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken - /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the - /// data is written incorrectly and will always fail to resume the download. For more information about the bug and - /// possible workarounds, please refer to the following Stack Overflow post: - /// - /// - http://stackoverflow.com/a/39347461/1342462 - /// - /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` - /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for - /// additional information. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - return download(.resumeData(resumeData), to: destination) - } - - // MARK: Private - Download Implementation - - private func download( - _ downloadable: DownloadRequest.Downloadable, - to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { - do { - let task = try downloadable.task(session: session, adapter: adapter, queue: queue) - let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) - - download.downloadDelegate.destination = destination - - delegate[task] = download - - if startRequestsImmediately { download.resume() } - - return download - } catch { - return download(downloadable, to: destination, failedWith: error) - } - } - - private func download( - _ downloadable: DownloadRequest.Downloadable?, - to destination: DownloadRequest.DownloadFileDestination?, - failedWith error: Error) - -> DownloadRequest - { - var downloadTask: Request.RequestTask = .download(nil, nil) - - if let downloadable = downloadable { - downloadTask = .download(downloadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - - let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) - download.downloadDelegate.destination = destination - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: download, with: underlyingError) - } else { - if startRequestsImmediately { download.resume() } - } - - return download - } - - // MARK: - Upload Request - - // MARK: File - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(fileURL, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.file(fileURL, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: Data - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(data, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.data(data, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(stream, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.stream(stream, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: MultipartFormData - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `url`, `method` and `headers`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - - return upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - queue: queue, - encodingCompletion: encodingCompletion - ) - } catch { - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `urlRequest`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter urlRequest: The URL request. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - DispatchQueue.global(qos: .utility).async { - let formData = MultipartFormData() - multipartFormData(formData) - - var tempFileURL: URL? - - do { - var urlRequestWithContentType = try urlRequest.asURLRequest() - urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - let data = try formData.encode() - - let encodingResult = MultipartFormDataEncodingResult.success( - request: self.upload(data, with: urlRequestWithContentType), - streamingFromDisk: false, - streamFileURL: nil - ) - - (queue ?? DispatchQueue.main).async { encodingCompletion?(encodingResult) } - } else { - let fileManager = FileManager.default - let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") - let fileName = UUID().uuidString - let fileURL = directoryURL.appendingPathComponent(fileName) - - tempFileURL = fileURL - - var directoryError: Error? - - // Create directory inside serial queue to ensure two threads don't do this in parallel - self.queue.sync { - do { - try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) - } catch { - directoryError = error - } - } - - if let directoryError = directoryError { throw directoryError } - - try formData.writeEncodedData(to: fileURL) - - let upload = self.upload(fileURL, with: urlRequestWithContentType) - - // Cleanup the temp file once the upload is complete - upload.delegate.queue.addOperation { - do { - try FileManager.default.removeItem(at: fileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { - let encodingResult = MultipartFormDataEncodingResult.success( - request: upload, - streamingFromDisk: true, - streamFileURL: fileURL - ) - - encodingCompletion?(encodingResult) - } - } - } catch { - // Cleanup the temp file in the event that the multipart form data encoding failed - if let tempFileURL = tempFileURL { - do { - try FileManager.default.removeItem(at: tempFileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - } - - // MARK: Private - Upload Implementation - - private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { - do { - let task = try uploadable.task(session: session, adapter: adapter, queue: queue) - let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) - - if case let .stream(inputStream, _) = uploadable { - upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } - } - - delegate[task] = upload - - if startRequestsImmediately { upload.resume() } - - return upload - } catch { - return upload(uploadable, failedWith: error) - } - } - - private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { - var uploadTask: Request.RequestTask = .upload(nil, nil) - - if let uploadable = uploadable { - uploadTask = .upload(uploadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: upload, with: underlyingError) - } else { - if startRequestsImmediately { upload.resume() } - } - - return upload - } - -#if !os(watchOS) - - // MARK: - Stream Request - - // MARK: Hostname and Port - - /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter hostName: The hostname of the server to connect to. - /// - parameter port: The port of the server to connect to. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return stream(.stream(hostName: hostName, port: port)) - } - - // MARK: NetService - - /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter netService: The net service used to identify the endpoint. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(with netService: NetService) -> StreamRequest { - return stream(.netService(netService)) - } - - // MARK: Private - Stream Implementation - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { - do { - let task = try streamable.task(session: session, adapter: adapter, queue: queue) - let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return stream(failedWith: error) - } - } - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(failedWith error: Error) -> StreamRequest { - let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) - if startRequestsImmediately { stream.resume() } - return stream - } - -#endif - - // MARK: - Internal - Retry Request - - func retry(_ request: Request) -> Bool { - guard let originalTask = request.originalTask else { return false } - - do { - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - - if let originalTask = request.task { - delegate[originalTask] = nil // removes the old request to avoid endless growth - } - - request.delegate.task = task // resets all task delegate data - - request.retryCount += 1 - request.startTime = CFAbsoluteTimeGetCurrent() - request.endTime = nil - - task.resume() - - return true - } catch { - request.delegate.error = error.underlyingAdaptError ?? error - return false - } - } - - private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { - DispatchQueue.utility.async { [weak self] in - guard let strongSelf = self else { return } - - retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in - guard let strongSelf = self else { return } - - guard shouldRetry else { - if strongSelf.startRequestsImmediately { request.resume() } - return - } - - DispatchQueue.utility.after(timeDelay) { - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.retry(request) - - if retrySucceeded, let task = request.task { - strongSelf.delegate[task] = request - } else { - if strongSelf.startRequestsImmediately { request.resume() } - } - } - } - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift deleted file mode 100644 index 5705737e49d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ /dev/null @@ -1,466 +0,0 @@ -// -// TaskDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as -/// executing all operations attached to the serial operation queue upon task completion. -open class TaskDelegate: NSObject { - - // MARK: Properties - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: OperationQueue - - /// The data returned by the server. - public var data: Data? { return nil } - - /// The error generated throughout the lifecyle of the task. - public var error: Error? - - var task: URLSessionTask? { - set { - taskLock.lock(); defer { taskLock.unlock() } - _task = newValue - } - get { - taskLock.lock(); defer { taskLock.unlock() } - return _task - } - } - - var initialResponseTime: CFAbsoluteTime? - var credential: URLCredential? - var metrics: AnyObject? // URLSessionTaskMetrics - - private var _task: URLSessionTask? { - didSet { reset() } - } - - private let taskLock = NSLock() - - // MARK: Lifecycle - - init(task: URLSessionTask?) { - _task = task - - self.queue = { - let operationQueue = OperationQueue() - - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.isSuspended = true - operationQueue.qualityOfService = .utility - - return operationQueue - }() - } - - func reset() { - error = nil - initialResponseTime = nil - } - - // MARK: URLSessionTaskDelegate - - var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? - - @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - @objc(URLSession:task:didReceiveChallenge:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } - - @objc(URLSession:task:needNewBodyStream:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - var bodyStream: InputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - @objc(URLSession:task:didCompleteWithError:) - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - if self.error == nil { self.error = error } - - if - let downloadDelegate = self as? DownloadTaskDelegate, - let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data - { - downloadDelegate.resumeData = resumeData - } - } - - queue.isSuspended = false - } - } -} - -// MARK: - - -class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { - - // MARK: Properties - - var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } - - override var data: Data? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var dataStream: ((_ data: Data) -> Void)? - - private var totalBytesReceived: Int64 = 0 - private var mutableData: Data - - private var expectedContentLength: Int64? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - mutableData = Data() - progress = Progress(totalUnitCount: 0) - - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - totalBytesReceived = 0 - mutableData = Data() - expectedContentLength = nil - } - - // MARK: URLSessionDataDelegate - - var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - var disposition: URLSession.ResponseDisposition = .allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data) - } else { - mutableData.append(data) - } - - let bytesReceived = Int64(data.count) - totalBytesReceived += bytesReceived - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - var cachedResponse: CachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } -} - -// MARK: - - -class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { - - // MARK: Properties - - var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var resumeData: Data? - override var data: Data? { return resumeData } - - var destination: DownloadRequest.DownloadFileDestination? - - var temporaryURL: URL? - var destinationURL: URL? - - var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - progress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - resumeData = nil - } - - // MARK: URLSessionDownloadDelegate - - var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? - var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - temporaryURL = location - - guard - let destination = destination, - let response = downloadTask.response as? HTTPURLResponse - else { return } - - let result = destination(location, response) - let destinationURL = result.destinationURL - let options = result.options - - self.destinationURL = destinationURL - - do { - if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { - try FileManager.default.removeItem(at: destinationURL) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destinationURL.deletingLastPathComponent() - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try FileManager.default.moveItem(at: location, to: destinationURL) - } catch { - self.error = error - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } -} - -// MARK: - - -class UploadTaskDelegate: DataTaskDelegate { - - // MARK: Properties - - var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } - - var uploadProgress: Progress - var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - uploadProgress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - uploadProgress = Progress(totalUnitCount: 0) - } - - // MARK: URLSessionTaskDelegate - - var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - func URLSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - if let uploadProgressHandler = uploadProgressHandler { - uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } - } - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift deleted file mode 100644 index 596c1bdc41f..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Timeline.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. -public struct Timeline { - /// The time the request was initialized. - public let requestStartTime: CFAbsoluteTime - - /// The time the first bytes were received from or sent to the server. - public let initialResponseTime: CFAbsoluteTime - - /// The time when the request was completed. - public let requestCompletedTime: CFAbsoluteTime - - /// The time when the response serialization was completed. - public let serializationCompletedTime: CFAbsoluteTime - - /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: TimeInterval - - /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: TimeInterval - - /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: TimeInterval - - /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: TimeInterval - - /// Creates a new `Timeline` instance with the specified request times. - /// - /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - /// Defaults to `0.0`. - /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - /// to `0.0`. - /// - /// - returns: The new `Timeline` instance. - public init( - requestStartTime: CFAbsoluteTime = 0.0, - initialResponseTime: CFAbsoluteTime = 0.0, - requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { - self.requestStartTime = requestStartTime - self.initialResponseTime = initialResponseTime - self.requestCompletedTime = requestCompletedTime - self.serializationCompletedTime = serializationCompletedTime - - self.latency = initialResponseTime - requestStartTime - self.requestDuration = requestCompletedTime - requestStartTime - self.serializationDuration = serializationCompletedTime - requestCompletedTime - self.totalDuration = serializationCompletedTime - requestStartTime - } -} - -// MARK: - CustomStringConvertible - -extension Timeline: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the latency, the request - /// duration and the total duration. - public var description: String { - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} - -// MARK: - CustomDebugStringConvertible - -extension Timeline: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes the request start time, the - /// initial response time, the request completed time, the serialization completed time, the latency, the request - /// duration and the total duration. - public var debugDescription: String { - let requestStartTime = String(format: "%.3f", self.requestStartTime) - let initialResponseTime = String(format: "%.3f", self.initialResponseTime) - let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) - let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Request Start Time\": " + requestStartTime, - "\"Initial Response Time\": " + initialResponseTime, - "\"Request Completed Time\": " + requestCompletedTime, - "\"Serialization Completed Time\": " + serializationCompletedTime, - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index 59e0bbb2b0e..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,321 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - - // MARK: Helper Types - - fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - /// Used to represent whether validation was successful or encountered an error resulting in a failure. - /// - /// - success: The validation was successful. - /// - failure: The validation failed encountering the provided error. - public enum ValidationResult { - case success - case failure(Error) - } - - fileprivate struct MIMEType { - let type: String - let subtype: String - - var isWildcard: Bool { return type == "*" && subtype == "*" } - - init?(_ string: String) { - let components: [String] = { - let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - - #if swift(>=3.2) - let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - #else - let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) - #endif - - return split.components(separatedBy: "/") - }() - - if let type = components.first, let subtype = components.last { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(_ mime: MIMEType) -> Bool { - switch (type, subtype) { - case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - // MARK: Properties - - fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } - - fileprivate var acceptableContentTypes: [String] { - if let accept = request?.value(forHTTPHeaderField: "Accept") { - return accept.components(separatedBy: ",") - } - - return ["*/*"] - } - - // MARK: Status Code - - fileprivate func validate( - statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == Int - { - if acceptableStatusCodes.contains(response.statusCode) { - return .success - } else { - let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) - return .failure(AFError.responseValidationFailed(reason: reason)) - } - } - - // MARK: Content Type - - fileprivate func validate( - contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) - -> ValidationResult - where S.Iterator.Element == String - { - guard let data = data, data.count > 0 else { return .success } - - guard - let responseContentType = response.mimeType, - let responseMIMEType = MIMEType(responseContentType) - else { - for contentType in acceptableContentTypes { - if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } - - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .unacceptableContentType( - acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType - ) - - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } -} - -// MARK: - - -extension DataRequest { - /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the - /// request was valid. - public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(self.request, response, self.delegate.data) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, data in - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -// MARK: - - -extension DownloadRequest { - /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a - /// destination URL, and returns whether the request was valid. - public typealias Validation = ( - _ request: URLRequest?, - _ response: HTTPURLResponse, - _ temporaryURL: URL?, - _ destinationURL: URL?) - -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - let request = self.request - let temporaryURL = self.downloadDelegate.temporaryURL - let destinationURL = self.downloadDelegate.destinationURL - - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(request, response, temporaryURL, destinationURL) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, _, _ in - let fileURL = self.downloadDelegate.fileURL - - guard let validFileURL = fileURL else { - return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) - } - - do { - let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } catch { - return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) - } - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json deleted file mode 100644 index 6c368e72337..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "PetstoreClient", - "platforms": { - "ios": "9.0", - "osx": "10.11", - "tvos": "9.0" - }, - "version": "1.0.0", - "source": { - "git": "git@github.com:OpenAPITools/openapi-generator.git", - "tag": "v1.0.0" - }, - "authors": "", - "license": "Proprietary", - "homepage": "https://github.com/openapitools/openapi-generator", - "summary": "PetstoreClient", - "source_files": "PetstoreClient/Classes/**/*.swift", - "dependencies": { - "PromiseKit/CorePromise": [ - "~> 4.4.0" - ], - "Alamofire": [ - "~> 4.9.0" - ] - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Manifest.lock deleted file mode 100644 index 355d4c9f5f0..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Manifest.lock +++ /dev/null @@ -1,27 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - - PromiseKit/CorePromise (~> 4.4.0) - - PromiseKit/CorePromise (4.4.4) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - Alamofire - - PromiseKit - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: 16d0f56d050fe19acef55197555f60526cf4a71b - PromiseKit: 6178219c4c7457ae90d7d8b34b7ac5eb36916519 - -PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d - -COCOAPODS: 1.6.1 diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 6e4730ff2e6..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1651 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 02CB7A74792FE71D55618B1FD68A84F2 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92066FF1F08D20558637C2DF4F007414 /* TypeHolderDefault.swift */; }; - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B6740A1E78009ED5880C768EDAD9DB /* Response.swift */; }; - 091CC6D7CFF9374E41B1C6CB19B0E97B /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D9FB4070F34ECD420ACB66E1938430 /* APIs.swift */; }; - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8873E6FA376A1098653C8957A9CD8A /* Alamofire.swift */; }; - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0CD12250A91D4CBC55393495F06775B2 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 706EA1E33802DC5002C4619F94BC8C99 /* JSONEncodableEncoding.swift */; }; - 0F5999FD4C7B20C99945D1766DCE1E1C /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48D66D7CC32AD262384136A281A3F8D1 /* Alamofire.framework */; }; - 13E3586ABCE7938EB3CC6D51BAD31B42 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04FA8D90CF4B9585A67B86642BA750E /* User.swift */; }; - 17CBDD207E1B25F63A3E1823BC03B675 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */; }; - 1B20892D757F702E6AE23072F5E15D04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */; }; - 1C035F0DFD555DC8249BE265F89C3071 /* PromiseKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1844EB7E5BB13D3E0EB4144A87D867 /* PromiseKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D047C054BDCF57647A210CA210568D0 /* Notifications.swift */; }; - 24406F8A6355B7BEC2B072D3B17ECD47 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 863792E6E9405D9FA494ED8635CE6C0B /* Model200Response.swift */; }; - 26DD5BC612DBFC51C9A2EC25AF219566 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = F0E666A2F03AB68FDC1E79B74A41E0C2 /* fwd.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28A9B496DBCD33380CC3D4CC155F524E /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39B0696CC11BF8EA7FDEC30C719FABC2 /* Models.swift */; }; - 2CDAC18FCB90313EFA1B02A75C83E0EE /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDADBC0BB257C4A516773B0ECA96196 /* AnotherFakeAPI.swift */; }; - 2E29AA764BF206DE155112E5BC4939E8 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B71ED5DCF22D2A22499C3DA4D41762 /* Name.swift */; }; - 317719762D81596E1DD4BC4786311DF5 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F38E2E2D4911E1D04FABA2223BD7688 /* when.m */; }; - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C72D782FD3C5EEE8E525751B6D4DDB8 /* Request.swift */; }; - 3593A7A85BE6F92BC7BEA765C89B1076 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A5A74AC7AF5B77CA1BD76B82062D5D3 /* PetAPI.swift */; }; - 36C038AE1EFBD5D95D3B3102A737DFDE /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7295C7D32B7C8F2805DB5D2F3D732F60 /* OuterComposite.swift */; }; - 39CFC0AF6016C70C5EA5345DFE44FEB4 /* Pods-SwaggerClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */; }; - 3B14FC1EA44225994453AA123F4262D0 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABBBF50FA7E854657BDB01185C7DE324 /* XmlItem.swift */; }; - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */; }; - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A86D1C0C7700196DC16755F82D031B /* DispatchQueue+Alamofire.swift */; }; - 40AE1B240B27734094AB39EACA233A0D /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE73527DDD3B6ACE1DC5B450D1392B2A /* Promise.swift */; }; - 410EC2309E393CB88C39529E7CF18811 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EC4A49FB365F7019625F4C1BBCB292 /* FakeAPI.swift */; }; - 47E148EE42FDCD51C69EA7EB322496BD /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = 057172115AF48E3DCA451233A4A640D4 /* join.swift */; }; - 4D4DCE405773A7673D0199A93FE9DE62 /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4D33B469C31ECB943475DBFB00CBB /* Dog.swift */; }; - 51909107FAE52A0D1C8AE11B65DE08E7 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A10AF8E314E52BF5F7CD27303878027 /* after.m */; }; - 526815FE7172F8568A44A8F4D9139970 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D69622D72C7F771C350E30C30020EC /* SpecialModelName.swift */; }; - 5C5EA546013E597E3D52DD83B5C92D13 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97A2C094645F6A60D5A7F4E894EE23BD /* UserAPI.swift */; }; - 5CAA0F2AB773CCD6E62848CC02470C8E /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A06291A67C87943DA0BB177E1BB5DC0 /* dispatch_promise.m */; }; - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F7C3F0D5E6C5A6A1BB66A132C7D958 /* Timeline.swift */; }; - 636C75AD8D045A1687F83CA89AF49A86 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9475C74C195567107086633A4D262E6 /* Capitalization.swift */; }; - 64B570EF5C1FF1379F8036D8FCCB63EF /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4A146F2131F799FABD6835B1CFDD347 /* StoreAPI.swift */; }; - 67D2462106E9DB4C3D16D5F521C99250 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9919E54A07648F68B8B5639C3D37053F /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - 687C2F140C3AFB4F2FA5147EF9790F1D /* Pods-SwaggerClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6AF9A6069796DA5834FEEAFD7221874F /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999653E1FEB8493AD6E227418DFE96D4 /* Return.swift */; }; - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */; }; - 6C2E4B236C0831BEF971D9F43E41401D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */; }; - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A009E375554819534829616F49D733C /* ResponseSerialization.swift */; }; - 6FACE6A9C43083DBB5033317AFF9AE31 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59752DB0583557ED0A103929DE7D1C9 /* ArrayOfNumberOnly.swift */; }; - 6FC066D0A7B565C871A65F540E37735F /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9A53FCDA869FFF602D9C9B68A25226 /* MapTest.swift */; }; - 6FDC9E3B9907CF35FC038BD79A7DE2AC /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A41207BF0E0F1116EFF3A7520E4F30 /* Animal.swift */; }; - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45296D9EFD89DCB6A902D002A70E234F /* ParameterEncoding.swift */; }; - 726DCC0BBB21F735986DF5C9F3DCBEF6 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8146A56E871C702178198F216CD8B080 /* PromiseKit-dummy.m */; }; - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72572B944808AC7C4854543BC132DFD8 /* NetworkReachabilityManager.swift */; }; - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 146F60360CAB9CAF5A98D361FE0762CC /* Alamofire-dummy.m */; }; - 77A253AD92BDAF5465031F9225A13F8D /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C868C2F462554B7E170F490CC96D9129 /* OuterEnum.swift */; }; - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2A2E212CE2309CAC426DE24D621FDC4 /* TaskDelegate.swift */; }; - 7A00D62842DD238AC0457B7743459143 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D7EC36638E4AB5C51EE2A9196D7E586 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7B14AABEA6084A6CAAD77F02D700A436 /* GlobalState.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C7EEAA52CAEFE414144646859D19BF6 /* GlobalState.m */; }; - 7B847086909F16338E32D2290866777C /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06C0DAD6966724111ECC6015B132A10 /* List.swift */; }; - 7C0B7D57C5FED546B89AF6A45F276C36 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC9640039255992199037E6E249CD4BA /* TypeHolderExample.swift */; }; - 7D3B1A7247A69E34E48CED53C5145C34 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C65DCB83B644ABFF723D9EDA2FB9E0C /* PetstoreClient-dummy.m */; }; - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A2E5CCDF5F8198ACB62180A77E07C2 /* AFError.swift */; }; - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */; }; - 8766DA6D3446770DAAF3D68E154E61BD /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62DA94E0DEA0A35F82AB7D9B8D7FA79F /* EnumTest.swift */; }; - 87D949C0631CC0CB929C69CA7D925B14 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAB640C655ED6CF3F5D5C2314B9FB6B /* FakeClassnameTags123API.swift */; }; - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55431698AE115B7B9BB79A1D53B02AF /* ServerTrustPolicy.swift */; }; - 8D53C0725D4DE490174105C56C981189 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBAE8AD90A56C780F6620DBED839BA6 /* Pet.swift */; }; - 8F063138AEB0CBD41F723D7C8C6C9A1C /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2C82B8D4ECBBD48AE25659F2AEBFED8 /* after.swift */; }; - 8FC55DB96BAADB3B12B0DAB26332E40A /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861B9982272479ABE4C4C559BFA8B0F6 /* FileSchemaTestClass.swift */; }; - 910364E886094608091F77F9DBF1AE2E /* DispatchQueue+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848CDB5C465B1E04DF5158F07B83EE6B /* DispatchQueue+Promise.swift */; }; - 975E21814E0F788DF6A6E5DE986229E6 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = ADA8ECE65CA8BD73FABB353F0DBAA212 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9A30D9B1EE2D5A3AC76AE389E0520352 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11D9A9B2DA688589C27C7E886C45C6A0 /* Cat.swift */; }; - 9B72FB26EC959DD96FDBB044A9C3C525 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 91CB8ACD285957E691D4B962FB4D995B /* join.m */; }; - 9D8C37EA1313F9BBDD200D8FCB93CCFA /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FA863F5D3ACE15F4B0EB8D1E74927ED /* AnyPromise.m */; }; - 9FBC90C0E307ADB8CD2F3CF5C0D3C8EE /* Zalgo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A7DCCAD07BACD1357F077BCA314A6D /* Zalgo.swift */; }; - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9E25BFB027008543966243CC338E08E /* SessionDelegate.swift */; }; - A64FF2ED84938912BA601B01121B8E23 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E89ABCCC57336F89BD5C8BB5B4872B /* Order.swift */; }; - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83D18CAC667F7E35D9B8E620072ED4D7 /* Validation.swift */; }; - ABDB6B2BD6587F48ADD190B84019CDD7 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A381312D61E3EA2806B6FAD90B3BEE94 /* PromiseKit.framework */; }; - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2ED731C536593898FB5674BF6A7DC86 /* MultipartFormData.swift */; }; - B394CD18FC054147A348F808EAC8139A /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D7E4D001368609BA573263A283441DD /* AlamofireImplementations.swift */; }; - B433389CCA40FDC6A02956C940F80112 /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D9F269A5D0FA67A43F1F5D94F26D1B /* State.swift */; }; - B4A2386087F99886C5CC944C2A5B58C7 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB771F553FC5BEE61938D2B61CDA2CDF /* NumberOnly.swift */; }; - B511D9CED36E092C88AB629C511BD1E7 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 421C2470DDB7AF4A716391E4E9BA4602 /* Category.swift */; }; - B645EC01163024890ADE8D5C9EAF8EE5 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = C42B10EE07C66F6B51BBEB51046AB299 /* hang.m */; }; - B652075D043B2D37A0B1FA649065FC3F /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CFB3D593ECA1A24451987289C9B395 /* StringBooleanMap.swift */; }; - B67DB5083264B8C8896D3DF3F5FE2E20 /* wrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E040842BCDCCB56DA8C4C1E77A905E /* wrap.swift */; }; - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82F46EEBDF3CDC0F371A13742C7C00 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BA93909A110EB66F7167C3B326A5D2B0 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDE9C75E8809A86C87F1EF6BE5A7262 /* AdditionalPropertiesClass.swift */; }; - BC5A794B04B4DEA6F0473FD3E8952BDC /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54113FF25263A7207B4695B993005157 /* EnumClass.swift */; }; - BE5BBDF15A7C0C9CF88A0268815B8202 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 683B7D10FA5B9F3523A5976092B503D2 /* JSONEncodingHelper.swift */; }; - BF0B6C073FB6099B4BB906527BFA43FD /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FB9EC1A94087BEE99F46EDC560EF076 /* ArrayOfArrayOfNumberOnly.swift */; }; - BF7C810E194570D018B13127190459E5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD186DA30C241B56CD1BE298604BBC5 /* AnimalFarm.swift */; }; - BFB77FC4FC5E7D0680CE25025D0F818F /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F7E93BB98A2DE82741AB7E95364E2E3 /* FormatTest.swift */; }; - C0887203727473C7A8A9084437976426 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9EA3D1DFE57CA229F3C7E3F3737154 /* when.swift */; }; - C1245D0FDDA57F8CEAA283B028D09D09 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2595AC2F6A360B57A8D3D63C239BA43 /* DogAllOf.swift */; }; - C13E3FEC49E848F2CC5794FF93065029 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0467367B175C2F0A832EF481D058A3B1 /* ApiResponse.swift */; }; - C80C11BB589CAA31898343105C285051 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6F98097E49FF48BBF52B4D577575897 /* Extensions.swift */; }; - C94A6EA921453BFA4C082DFAC9C1C7EC /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7093CCE3918A0AF33C35DE6D2D7E50B2 /* ArrayTest.swift */; }; - CE18C1FBB0A93582860FFAF71E056F6A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39FD32A271A0C2C893B43793B933F616 /* CatAllOf.swift */; }; - D1DA04105E2DD51C51C44E841F8032E1 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29BA92EB036AC93CED81C533893913E0 /* APIHelper.swift */; }; - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DF70E51226B5CFA18D8A74279984374 /* SessionManager.swift */; }; - D7EAFEBB963D9B9C8BC00951572B8571 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06090E7502DCF820B39197445505140 /* AnyPromise.swift */; }; - DF9AFA6422C6A99873955D59EF32DFAD /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBA48E443F18480EDF7990B4B747C01C /* Tag.swift */; }; - E160BF1E02EA978930609C95C93EEF16 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA6C5985BAF3713D3B44503E95F0FB80 /* HasOnlyReadOnly.swift */; }; - E5C45F26D8419C4BE5642B1E321894DD /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C84522B99B59B341AB4C8B336ED0C5F /* Configuration.swift */; }; - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FDF1E434780F3B9150349C6920B90CE /* Result.swift */; }; - EC94B1BA635C6723DCFC17912BE0C588 /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005C9DFB4855B699557271A22E350181 /* Promise+Properties.swift */; }; - ED06569D6C27D747E3E98ACF2F3CF0D8 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A65F4CD1E4DF96497733DACEEE24510 /* File.swift */; }; - F1620139EC36E6F5E4A98718BC41407D /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 166F3B2D4B92170923DEDBF0DC6EA0EF /* ClassModel.swift */; }; - F3A7212660A85B8AA43AD950729FBEA4 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04534F5AA06E6782A3CA6B026100F75E /* EnumArrays.swift */; }; - F47A5B894FD1450562D373B1D33D6A61 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E85A5CF8B173DB33BC07D63DE81D716 /* Client.swift */; }; - F7E9E11EFB5556B4D6033CC522502126 /* Promise+AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BEC984F88B74ADDDFFCF4891539CC56 /* Promise+AnyPromise.swift */; }; - FB407559577B3E19CAF1D3E75D4A7AAE /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B749F866CD9E9BFD8C8EAE1DDB1EB84 /* Error.swift */; }; - FE76A7AA575836F1EE950DDFEAE2CF7B /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32FDBEBEEE3527CDFB764B9D267598AB /* race.swift */; }; - FFA407C091EEE5260E0C08655A0947EB /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A625E9EFA94098A17E16D12F9166900 /* ReadOnlyFirst.swift */; }; - FFA9DEB1EEA584789F46BBD344961268 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7083C42A5DC6552DCB8F1A1E03CCA816 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FFEE16A611067AB36CB750E960FEC9E8 /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC69D2B8F2AE344EAA07F51A9750D0D2 /* CodableHelper.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 46A96CCA6A1D1F8D0F013D7285FE0374 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = F1D420F0D4A15B40A58DAEF987DD36C3; - remoteInfo = PetstoreClient; - }; - 546F8B9CAB0CCCB3CAA12EAFD808A106 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BB3D3DCE720C235EF143F0E12FF69CA8; - remoteInfo = PromiseKit; - }; - 8457C9F78C76721ECB8A14CE04BB0A4B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - CA4BC4C012806840D9DC2B2430920C98 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 231FDEAF460449DE9E4B3F7B823FD3A3; - remoteInfo = "Pods-SwaggerClient"; - }; - FA9F1AC6C8600F3A18D9309C97C11B70 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BB3D3DCE720C235EF143F0E12FF69CA8; - remoteInfo = PromiseKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 005C9DFB4855B699557271A22E350181 /* Promise+Properties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Properties.swift"; path = "Sources/Promise+Properties.swift"; sourceTree = ""; }; - 01A5C01DA27D0796FD50B4BA65BAF819 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PromiseKit.modulemap; sourceTree = ""; }; - 01B6740A1E78009ED5880C768EDAD9DB /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 024B6CCE54665B2B8C5A6A361996F330 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 0378F66031FCAEA1771BE52BF95BBF3A /* User.md */ = {isa = PBXFileReference; includeInIndex = 1; name = User.md; path = docs/User.md; sourceTree = ""; }; - 044ED8C312BDDA8A93EF9740A5D6635C /* Model200Response.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Model200Response.md; path = docs/Model200Response.md; sourceTree = ""; }; - 04534F5AA06E6782A3CA6B026100F75E /* EnumArrays.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 0467367B175C2F0A832EF481D058A3B1 /* ApiResponse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - 04D69622D72C7F771C350E30C30020EC /* SpecialModelName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 04D9F269A5D0FA67A43F1F5D94F26D1B /* State.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = State.swift; path = Sources/State.swift; sourceTree = ""; }; - 04F4D33B469C31ECB943475DBFB00CBB /* Dog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - 057172115AF48E3DCA451233A4A640D4 /* join.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = join.swift; path = Sources/join.swift; sourceTree = ""; }; - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; - 07F8EFE5AA6510095D2E009863317CB9 /* Order.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Order.md; path = docs/Order.md; sourceTree = ""; }; - 09F7C3F0D5E6C5A6A1BB66A132C7D958 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 0E85A5CF8B173DB33BC07D63DE81D716 /* Client.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - 11D9A9B2DA688589C27C7E886C45C6A0 /* Cat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 146F60360CAB9CAF5A98D361FE0762CC /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - 166F3B2D4B92170923DEDBF0DC6EA0EF /* ClassModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 16F3A5E2D2142E1A4325498FC5C53DA0 /* DogAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = DogAllOf.md; path = docs/DogAllOf.md; sourceTree = ""; }; - 192D52CF963F026FC4AE2398773BBC50 /* EnumTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumTest.md; path = docs/EnumTest.md; sourceTree = ""; }; - 1ED294369B879E2098B334C63575B7F1 /* PetAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PetAPI.md; path = docs/PetAPI.md; sourceTree = ""; }; - 1FE541DC5CA53C88DF7EBA29B807D613 /* PetstoreClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PetstoreClient-Info.plist"; sourceTree = ""; }; - 224E8CF92D8CEAABA9CEBF326A1F3592 /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PetstoreClient.modulemap; sourceTree = ""; }; - 22770A1D5CBD0B223DC3CDB943156D32 /* Return.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Return.md; path = docs/Return.md; sourceTree = ""; }; - 25103330F23FA9F2529571F308093057 /* MapTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MapTest.md; path = docs/MapTest.md; sourceTree = ""; }; - 262FAE23D33A5D8D25FD3174BD218D2D /* CatAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = CatAllOf.md; path = docs/CatAllOf.md; sourceTree = ""; }; - 29BA92EB036AC93CED81C533893913E0 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = PetstoreClient/Classes/OpenAPIs/APIHelper.swift; sourceTree = ""; }; - 29CE11B261C3803DAC95698C526C28F5 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2A06291A67C87943DA0BB177E1BB5DC0 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 2C65DCB83B644ABFF723D9EDA2FB9E0C /* PetstoreClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PetstoreClient-dummy.m"; sourceTree = ""; }; - 2C84522B99B59B341AB4C8B336ED0C5F /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = PetstoreClient/Classes/OpenAPIs/Configuration.swift; sourceTree = ""; }; - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClient-umbrella.h"; sourceTree = ""; }; - 2F38E2E2D4911E1D04FABA2223BD7688 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = ""; }; - 32FDBEBEEE3527CDFB764B9D267598AB /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - 355D469521D44A6D4EB3DA64FDE5F7C6 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 37D607ECD2F930FE1DB14AAD3D2FA264 /* OuterEnum.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterEnum.md; path = docs/OuterEnum.md; sourceTree = ""; }; - 38E040842BCDCCB56DA8C4C1E77A905E /* wrap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = wrap.swift; path = Sources/wrap.swift; sourceTree = ""; }; - 39B0696CC11BF8EA7FDEC30C719FABC2 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Models.swift; path = PetstoreClient/Classes/OpenAPIs/Models.swift; sourceTree = ""; }; - 39FD32A271A0C2C893B43793B933F616 /* CatAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3A009E375554819534829616F49D733C /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 3A5A74AC7AF5B77CA1BD76B82062D5D3 /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 3AAB640C655ED6CF3F5D5C2314B9FB6B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - 3B8873E6FA376A1098653C8957A9CD8A /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 3F5E9D64C5F0D5EE4E79CAA59E04172C /* ApiResponse.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ApiResponse.md; path = docs/ApiResponse.md; sourceTree = ""; }; - 3FDF1E434780F3B9150349C6920B90CE /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 421C2470DDB7AF4A716391E4E9BA4602 /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 44CC620F46D960EF0B6F97F430F5FC1E /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 45296D9EFD89DCB6A902D002A70E234F /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 4536398A85D1D5BBB39C3849096317B8 /* UserAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = UserAPI.md; path = docs/UserAPI.md; sourceTree = ""; }; - 45BAB97CF70E7E9B8D97D643CB602EBB /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = ""; }; - 48D66D7CC32AD262384136A281A3F8D1 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = ""; }; - 4CD9592220A0204D65C56DC92A81DA49 /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; - 4CE19599ABE0E7AE1F173DBA59E31076 /* Client.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Client.md; path = docs/Client.md; sourceTree = ""; }; - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-Info.plist"; sourceTree = ""; }; - 4E1844EB7E5BB13D3E0EB4144A87D867 /* PromiseKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-umbrella.h"; sourceTree = ""; }; - 4F9A53FCDA869FFF602D9C9B68A25226 /* MapTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 4FB9EC1A94087BEE99F46EDC560EF076 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 4FBAE8AD90A56C780F6620DBED839BA6 /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClientTests-umbrella.h"; sourceTree = ""; }; - 51A86D1C0C7700196DC16755F82D031B /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 5386BBE743C361BFF3494F43FE388D82 /* Dog.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Dog.md; path = docs/Dog.md; sourceTree = ""; }; - 54113FF25263A7207B4695B993005157 /* EnumClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 54E07AE118C3A0E6F7D341C158295E78 /* EnumClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumClass.md; path = docs/EnumClass.md; sourceTree = ""; }; - 5FBB2BEE096BE1F26A2F82F63C2A9137 /* PetstoreClient.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = PetstoreClient.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClient.modulemap"; sourceTree = ""; }; - 61A1A22EC0CE765486E1DD7D915F1B67 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 62DA94E0DEA0A35F82AB7D9B8D7FA79F /* EnumTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - 64A2381235D9FBB789BE4EB25C3250C2 /* AnotherFakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnotherFakeAPI.md; path = docs/AnotherFakeAPI.md; sourceTree = ""; }; - 67CAA50227E3326A9816E28A7CD74A9C /* StringBooleanMap.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StringBooleanMap.md; path = docs/StringBooleanMap.md; sourceTree = ""; }; - 683B7D10FA5B9F3523A5976092B503D2 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift; sourceTree = ""; }; - 6C72D782FD3C5EEE8E525751B6D4DDB8 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 6D7E4D001368609BA573263A283441DD /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireImplementations.swift; path = PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift; sourceTree = ""; }; - 6F0DF3F13D20C6C62978412D37A6E05B /* EnumArrays.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumArrays.md; path = docs/EnumArrays.md; sourceTree = ""; }; - 706EA1E33802DC5002C4619F94BC8C99 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodableEncoding.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift; sourceTree = ""; }; - 7083C42A5DC6552DCB8F1A1E03CCA816 /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; - 7093CCE3918A0AF33C35DE6D2D7E50B2 /* ArrayTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - 72572B944808AC7C4854543BC132DFD8 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 7295C7D32B7C8F2805DB5D2F3D732F60 /* OuterComposite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - 75855F6DC341E04EB8A436C5A5516151 /* TypeHolderDefault.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderDefault.md; path = docs/TypeHolderDefault.md; sourceTree = ""; }; - 765E58692EB6F8B6798E43E94D7F4094 /* ArrayOfArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfArrayOfNumberOnly.md; path = docs/ArrayOfArrayOfNumberOnly.md; sourceTree = ""; }; - 77A2E5CCDF5F8198ACB62180A77E07C2 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 77E7F6EA3ADC6756C75AAB7DBB8AB130 /* Cat.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Cat.md; path = docs/Cat.md; sourceTree = ""; }; - 7A10AF8E314E52BF5F7CD27303878027 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 7A625E9EFA94098A17E16D12F9166900 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 7D7EC36638E4AB5C51EE2A9196D7E586 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - 7DF70E51226B5CFA18D8A74279984374 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 7FA863F5D3ACE15F4B0EB8D1E74927ED /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 8146A56E871C702178198F216CD8B080 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - 81B75710FF1D97F3BBA8CF87E5D7CFDB /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 83A28F36D4BF850589924CCEF888C624 /* File.md */ = {isa = PBXFileReference; includeInIndex = 1; name = File.md; path = docs/File.md; sourceTree = ""; }; - 83D18CAC667F7E35D9B8E620072ED4D7 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 848CDB5C465B1E04DF5158F07B83EE6B /* DispatchQueue+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Promise.swift"; path = "Sources/DispatchQueue+Promise.swift"; sourceTree = ""; }; - 861B9982272479ABE4C4C559BFA8B0F6 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 863792E6E9405D9FA494ED8635CE6C0B /* Model200Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 876786DF3A2782A83F27AAB4DF9B7129 /* SpecialModelName.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SpecialModelName.md; path = docs/SpecialModelName.md; sourceTree = ""; }; - 891AFA4406EB2D944EEA7D0DB1A042FC /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - 8A19875444C285AE928D471959E28CA2 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 8A65F4CD1E4DF96497733DACEEE24510 /* File.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 8BAD70A6195E195061F133B7EA8670DA /* Name.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Name.md; path = docs/Name.md; sourceTree = ""; }; - 8BEC984F88B74ADDDFFCF4891539CC56 /* Promise+AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+AnyPromise.swift"; path = "Sources/Promise+AnyPromise.swift"; sourceTree = ""; }; - 8D047C054BDCF57647A210CA210568D0 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 8DDE9C75E8809A86C87F1EF6BE5A7262 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 8F7E93BB98A2DE82741AB7E95364E2E3 /* FormatTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-Info.plist"; sourceTree = ""; }; - 91CB8ACD285957E691D4B962FB4D995B /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - 91E22058D6E4F60DC6174011E70A2252 /* StoreAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StoreAPI.md; path = docs/StoreAPI.md; sourceTree = ""; }; - 92066FF1F08D20558637C2DF4F007414 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-frameworks.sh"; sourceTree = ""; }; - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-acknowledgements.plist"; sourceTree = ""; }; - 97A2C094645F6A60D5A7F4E894EE23BD /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 9919E54A07648F68B8B5639C3D37053F /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 999653E1FEB8493AD6E227418DFE96D4 /* Return.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - 9A359A8A6EF5936FF2065AE9CBDCE44A /* ReadOnlyFirst.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ReadOnlyFirst.md; path = docs/ReadOnlyFirst.md; sourceTree = ""; }; - 9B749F866CD9E9BFD8C8EAE1DDB1EB84 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - 9C7EEAA52CAEFE414144646859D19BF6 /* GlobalState.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GlobalState.m; path = Sources/GlobalState.m; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A15505355E41E0A84C4DBB54E6722A6D /* AdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AdditionalPropertiesClass.md; path = docs/AdditionalPropertiesClass.md; sourceTree = ""; }; - A33BB5BD82FE354BE292BE1DE69FE51F /* HasOnlyReadOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = HasOnlyReadOnly.md; path = docs/HasOnlyReadOnly.md; sourceTree = ""; }; - A35F2B8231DE6F6D8A6EA88D06013D6E /* FakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeAPI.md; path = docs/FakeAPI.md; sourceTree = ""; }; - A381312D61E3EA2806B6FAD90B3BEE94 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A3B2B506FC78CDF88268C906E6638091 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; - A4A146F2131F799FABD6835B1CFDD347 /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A6F98097E49FF48BBF52B4D577575897 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = PetstoreClient/Classes/OpenAPIs/Extensions.swift; sourceTree = ""; }; - A87F3C66E22CB7E45520173CC79433C5 /* Tag.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Tag.md; path = docs/Tag.md; sourceTree = ""; }; - A9A41207BF0E0F1116EFF3A7520E4F30 /* Animal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - A9B71ED5DCF22D2A22499C3DA4D41762 /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - ABBBF50FA7E854657BDB01185C7DE324 /* XmlItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - AC144D2DF074FA8918C17F3B8D14EE68 /* FormatTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FormatTest.md; path = docs/FormatTest.md; sourceTree = ""; }; - ADA8ECE65CA8BD73FABB353F0DBAA212 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - ADC0280962FDFA97AD377F19BF78E755 /* PromiseKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PromiseKit-Info.plist"; sourceTree = ""; }; - AE73527DDD3B6ACE1DC5B450D1392B2A /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - B2A2E212CE2309CAC426DE24D621FDC4 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - B55431698AE115B7B9BB79A1D53B02AF /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - B8EBE4324A4F4CB8BDA4FA4F6701018A /* ArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfNumberOnly.md; path = docs/ArrayOfNumberOnly.md; sourceTree = ""; }; - B9EC4A49FB365F7019625F4C1BBCB292 /* FakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - BA5EB5823D5F03F25561928D53E496FC /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - BA6C5985BAF3713D3B44503E95F0FB80 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - BB59CDEC268DB47E3F70C984590CB9D5 /* FakeClassnameTags123API.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeClassnameTags123API.md; path = docs/FakeClassnameTags123API.md; sourceTree = ""; }; - BC9640039255992199037E6E249CD4BA /* TypeHolderExample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - BE70D2A78B09C7BC49E8D639EB88D8E7 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C291EB8933000D10C36F66A93478AA6E /* Pet.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Pet.md; path = docs/Pet.md; sourceTree = ""; }; - C42B10EE07C66F6B51BBEB51046AB299 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - C5BF10812C8B893BE942E8A61095B391 /* NumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = NumberOnly.md; path = docs/NumberOnly.md; sourceTree = ""; }; - C868C2F462554B7E170F490CC96D9129 /* OuterEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - CBA48E443F18480EDF7990B4B747C01C /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - CD82F46EEBDF3CDC0F371A13742C7C00 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClientTests-acknowledgements.markdown"; sourceTree = ""; }; - D04FA8D90CF4B9585A67B86642BA750E /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - D06090E7502DCF820B39197445505140 /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; - D0E85B45A1EC6339F7AA30F525EBDF1F /* ClassModel.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ClassModel.md; path = docs/ClassModel.md; sourceTree = ""; }; - D153E0692428B3BF93148DCD1E6BC00F /* Capitalization.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Capitalization.md; path = docs/Capitalization.md; sourceTree = ""; }; - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = ""; }; - D2595AC2F6A360B57A8D3D63C239BA43 /* DogAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - D2C82B8D4ECBBD48AE25659F2AEBFED8 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - D398056DC91B13AFAA8A0A890BBD89A4 /* AnimalFarm.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnimalFarm.md; path = docs/AnimalFarm.md; sourceTree = ""; }; - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = ""; }; - D59752DB0583557ED0A103929DE7D1C9 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - D5CFB3D593ECA1A24451987289C9B395 /* StringBooleanMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - D616FE27C480390E3487E307807E75E9 /* Animal.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Animal.md; path = docs/Animal.md; sourceTree = ""; }; - D9475C74C195567107086633A4D262E6 /* Capitalization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - DB771F553FC5BEE61938D2B61CDA2CDF /* NumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - DBD5E9D6569D80DDB9F58CEB3C331F16 /* OuterComposite.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterComposite.md; path = docs/OuterComposite.md; sourceTree = ""; }; - DCCC04D0377A09B744232406CEBA5F44 /* List.md */ = {isa = PBXFileReference; includeInIndex = 1; name = List.md; path = docs/List.md; sourceTree = ""; }; - DDDADBC0BB257C4A516773B0ECA96196 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - E2ED731C536593898FB5674BF6A7DC86 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - E3A91C056032AA15B2DE57D4907F5BC7 /* TypeHolderExample.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderExample.md; path = docs/TypeHolderExample.md; sourceTree = ""; }; - E9E89ABCCC57336F89BD5C8BB5B4872B /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - EAD186DA30C241B56CD1BE298604BBC5 /* AnimalFarm.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - EC9EA3D1DFE57CA229F3C7E3F3737154 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - EF416EF4C4DA347F1AE75E98A274B44F /* Category.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Category.md; path = docs/Category.md; sourceTree = ""; }; - EF87097269A87532273FD5EDDEBD4381 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - F06C0DAD6966724111ECC6015B132A10 /* List.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - F0E666A2F03AB68FDC1E79B74A41E0C2 /* fwd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - F2117E56C19928AF73DC30FDAB4534E6 /* FileSchemaTestClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FileSchemaTestClass.md; path = docs/FileSchemaTestClass.md; sourceTree = ""; }; - F3A7DCCAD07BACD1357F077BCA314A6D /* Zalgo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zalgo.swift; path = Sources/Zalgo.swift; sourceTree = ""; }; - F3D9FB4070F34ECD420ACB66E1938430 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIs.swift; path = PetstoreClient/Classes/OpenAPIs/APIs.swift; sourceTree = ""; }; - F86FD53F34987F63B036CD49F23452BD /* ArrayTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayTest.md; path = docs/ArrayTest.md; sourceTree = ""; }; - F9E25BFB027008543966243CC338E08E /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - FA65E6F618E30F8EADF884CD433F2B07 /* MixedPropertiesAndAdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MixedPropertiesAndAdditionalPropertiesClass.md; path = docs/MixedPropertiesAndAdditionalPropertiesClass.md; sourceTree = ""; }; - FC69D2B8F2AE344EAA07F51A9750D0D2 /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CodableHelper.swift; path = PetstoreClient/Classes/OpenAPIs/CodableHelper.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 810ABC6D498290E21B9332A43B49C990 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0F5999FD4C7B20C99945D1766DCE1E1C /* Alamofire.framework in Frameworks */, - 17CBDD207E1B25F63A3E1823BC03B675 /* Foundation.framework in Frameworks */, - ABDB6B2BD6587F48ADD190B84019CDD7 /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DBBF761421A799D7A8BD2A2A66AA2742 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6C2E4B236C0831BEF971D9F43E41401D /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F7179B3AD176A6A966429334C5123C54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1B20892D757F702E6AE23072F5E15D04 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 16B2EE9E2B1D8BB1D015243D60C9E749 /* Pods */ = { - isa = PBXGroup; - children = ( - B751834EF2619E4944003D0B65303DD7 /* Alamofire */, - 96FE78D4772FAD7CD22CB23A52446058 /* PromiseKit */, - ); - name = Pods; - sourceTree = ""; - }; - 17869DF432008141F7BA21237323EE4C /* Frameworks */ = { - isa = PBXGroup; - children = ( - 48D66D7CC32AD262384136A281A3F8D1 /* Alamofire.framework */, - A381312D61E3EA2806B6FAD90B3BEE94 /* PromiseKit.framework */, - EEC4E2560D8C158B5E6D73FD3A7282F7 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 826C3E3C744487BED408F658C0EE4EC1 /* PetstoreClient */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 1D4F3935E032683220CEBAF7CC10D3C2 /* Support Files */ = { - isa = PBXGroup; - children = ( - 45BAB97CF70E7E9B8D97D643CB602EBB /* Alamofire.modulemap */, - 891AFA4406EB2D944EEA7D0DB1A042FC /* Alamofire.xcconfig */, - 146F60360CAB9CAF5A98D361FE0762CC /* Alamofire-dummy.m */, - BA5EB5823D5F03F25561928D53E496FC /* Alamofire-Info.plist */, - 8A19875444C285AE928D471959E28CA2 /* Alamofire-prefix.pch */, - CD82F46EEBDF3CDC0F371A13742C7C00 /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */, - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 734399E851D5ED2BCDF59922F6113FFB /* Products */ = { - isa = PBXGroup; - children = ( - BE70D2A78B09C7BC49E8D639EB88D8E7 /* Alamofire.framework */, - 81B75710FF1D97F3BBA8CF87E5D7CFDB /* PetstoreClient.framework */, - 61A1A22EC0CE765486E1DD7D915F1B67 /* Pods_SwaggerClient.framework */, - 44CC620F46D960EF0B6F97F430F5FC1E /* Pods_SwaggerClientTests.framework */, - 29CE11B261C3803DAC95698C526C28F5 /* PromiseKit.framework */, - ); - name = Products; - sourceTree = ""; - }; - 7346ED6721AC0FFB52A2045ED09577EE /* CorePromise */ = { - isa = PBXGroup; - children = ( - 7A10AF8E314E52BF5F7CD27303878027 /* after.m */, - D2C82B8D4ECBBD48AE25659F2AEBFED8 /* after.swift */, - 7D7EC36638E4AB5C51EE2A9196D7E586 /* AnyPromise.h */, - 7FA863F5D3ACE15F4B0EB8D1E74927ED /* AnyPromise.m */, - D06090E7502DCF820B39197445505140 /* AnyPromise.swift */, - 2A06291A67C87943DA0BB177E1BB5DC0 /* dispatch_promise.m */, - 848CDB5C465B1E04DF5158F07B83EE6B /* DispatchQueue+Promise.swift */, - 9B749F866CD9E9BFD8C8EAE1DDB1EB84 /* Error.swift */, - F0E666A2F03AB68FDC1E79B74A41E0C2 /* fwd.h */, - 9C7EEAA52CAEFE414144646859D19BF6 /* GlobalState.m */, - C42B10EE07C66F6B51BBEB51046AB299 /* hang.m */, - 91CB8ACD285957E691D4B962FB4D995B /* join.m */, - 057172115AF48E3DCA451233A4A640D4 /* join.swift */, - AE73527DDD3B6ACE1DC5B450D1392B2A /* Promise.swift */, - 8BEC984F88B74ADDDFFCF4891539CC56 /* Promise+AnyPromise.swift */, - 005C9DFB4855B699557271A22E350181 /* Promise+Properties.swift */, - ADA8ECE65CA8BD73FABB353F0DBAA212 /* PromiseKit.h */, - 32FDBEBEEE3527CDFB764B9D267598AB /* race.swift */, - 04D9F269A5D0FA67A43F1F5D94F26D1B /* State.swift */, - 2F38E2E2D4911E1D04FABA2223BD7688 /* when.m */, - EC9EA3D1DFE57CA229F3C7E3F3737154 /* when.swift */, - 38E040842BCDCCB56DA8C4C1E77A905E /* wrap.swift */, - F3A7DCCAD07BACD1357F077BCA314A6D /* Zalgo.swift */, - ); - name = CorePromise; - sourceTree = ""; - }; - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */ = { - isa = PBXGroup; - children = ( - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */, - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */, - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */, - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */, - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */, - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */, - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */, - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */, - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */, - ); - name = "Pods-SwaggerClient"; - path = "Target Support Files/Pods-SwaggerClient"; - sourceTree = ""; - }; - 826C3E3C744487BED408F658C0EE4EC1 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - 6D7E4D001368609BA573263A283441DD /* AlamofireImplementations.swift */, - 29BA92EB036AC93CED81C533893913E0 /* APIHelper.swift */, - F3D9FB4070F34ECD420ACB66E1938430 /* APIs.swift */, - FC69D2B8F2AE344EAA07F51A9750D0D2 /* CodableHelper.swift */, - 2C84522B99B59B341AB4C8B336ED0C5F /* Configuration.swift */, - A6F98097E49FF48BBF52B4D577575897 /* Extensions.swift */, - 706EA1E33802DC5002C4619F94BC8C99 /* JSONEncodableEncoding.swift */, - 683B7D10FA5B9F3523A5976092B503D2 /* JSONEncodingHelper.swift */, - 39B0696CC11BF8EA7FDEC30C719FABC2 /* Models.swift */, - D7B7EC664DDCDD9A4918BBBD9B9BDEBC /* APIs */, - C6C1467FD411D6CD7E3CEAF0BF82F331 /* Models */, - D15241360159478315C62D19BD01F576 /* Pod */, - E744BC5198F66515CCC110C0907A7EB9 /* Support Files */, - ); - name = PetstoreClient; - path = ../..; - sourceTree = ""; - }; - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */, - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */, - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */, - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */, - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */, - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */, - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */, - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = "Pods-SwaggerClientTests"; - path = "Target Support Files/Pods-SwaggerClientTests"; - sourceTree = ""; - }; - 96FE78D4772FAD7CD22CB23A52446058 /* PromiseKit */ = { - isa = PBXGroup; - children = ( - 7346ED6721AC0FFB52A2045ED09577EE /* CorePromise */, - C21752F874F8F012DCDD69EA749D2C85 /* Support Files */, - ); - name = PromiseKit; - path = PromiseKit; - sourceTree = ""; - }; - B751834EF2619E4944003D0B65303DD7 /* Alamofire */ = { - isa = PBXGroup; - children = ( - 77A2E5CCDF5F8198ACB62180A77E07C2 /* AFError.swift */, - 3B8873E6FA376A1098653C8957A9CD8A /* Alamofire.swift */, - 51A86D1C0C7700196DC16755F82D031B /* DispatchQueue+Alamofire.swift */, - E2ED731C536593898FB5674BF6A7DC86 /* MultipartFormData.swift */, - 72572B944808AC7C4854543BC132DFD8 /* NetworkReachabilityManager.swift */, - 8D047C054BDCF57647A210CA210568D0 /* Notifications.swift */, - 45296D9EFD89DCB6A902D002A70E234F /* ParameterEncoding.swift */, - 6C72D782FD3C5EEE8E525751B6D4DDB8 /* Request.swift */, - 01B6740A1E78009ED5880C768EDAD9DB /* Response.swift */, - 3A009E375554819534829616F49D733C /* ResponseSerialization.swift */, - 3FDF1E434780F3B9150349C6920B90CE /* Result.swift */, - B55431698AE115B7B9BB79A1D53B02AF /* ServerTrustPolicy.swift */, - F9E25BFB027008543966243CC338E08E /* SessionDelegate.swift */, - 7DF70E51226B5CFA18D8A74279984374 /* SessionManager.swift */, - B2A2E212CE2309CAC426DE24D621FDC4 /* TaskDelegate.swift */, - 09F7C3F0D5E6C5A6A1BB66A132C7D958 /* Timeline.swift */, - 83D18CAC667F7E35D9B8E620072ED4D7 /* Validation.swift */, - 1D4F3935E032683220CEBAF7CC10D3C2 /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - C21752F874F8F012DCDD69EA749D2C85 /* Support Files */ = { - isa = PBXGroup; - children = ( - 01A5C01DA27D0796FD50B4BA65BAF819 /* PromiseKit.modulemap */, - 024B6CCE54665B2B8C5A6A361996F330 /* PromiseKit.xcconfig */, - 8146A56E871C702178198F216CD8B080 /* PromiseKit-dummy.m */, - ADC0280962FDFA97AD377F19BF78E755 /* PromiseKit-Info.plist */, - EF87097269A87532273FD5EDDEBD4381 /* PromiseKit-prefix.pch */, - 4E1844EB7E5BB13D3E0EB4144A87D867 /* PromiseKit-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/PromiseKit"; - sourceTree = ""; - }; - C6C1467FD411D6CD7E3CEAF0BF82F331 /* Models */ = { - isa = PBXGroup; - children = ( - 8DDE9C75E8809A86C87F1EF6BE5A7262 /* AdditionalPropertiesClass.swift */, - A9A41207BF0E0F1116EFF3A7520E4F30 /* Animal.swift */, - EAD186DA30C241B56CD1BE298604BBC5 /* AnimalFarm.swift */, - 0467367B175C2F0A832EF481D058A3B1 /* ApiResponse.swift */, - 4FB9EC1A94087BEE99F46EDC560EF076 /* ArrayOfArrayOfNumberOnly.swift */, - D59752DB0583557ED0A103929DE7D1C9 /* ArrayOfNumberOnly.swift */, - 7093CCE3918A0AF33C35DE6D2D7E50B2 /* ArrayTest.swift */, - D9475C74C195567107086633A4D262E6 /* Capitalization.swift */, - 11D9A9B2DA688589C27C7E886C45C6A0 /* Cat.swift */, - 39FD32A271A0C2C893B43793B933F616 /* CatAllOf.swift */, - 421C2470DDB7AF4A716391E4E9BA4602 /* Category.swift */, - 166F3B2D4B92170923DEDBF0DC6EA0EF /* ClassModel.swift */, - 0E85A5CF8B173DB33BC07D63DE81D716 /* Client.swift */, - 04F4D33B469C31ECB943475DBFB00CBB /* Dog.swift */, - D2595AC2F6A360B57A8D3D63C239BA43 /* DogAllOf.swift */, - 04534F5AA06E6782A3CA6B026100F75E /* EnumArrays.swift */, - 54113FF25263A7207B4695B993005157 /* EnumClass.swift */, - 62DA94E0DEA0A35F82AB7D9B8D7FA79F /* EnumTest.swift */, - 8A65F4CD1E4DF96497733DACEEE24510 /* File.swift */, - 861B9982272479ABE4C4C559BFA8B0F6 /* FileSchemaTestClass.swift */, - 8F7E93BB98A2DE82741AB7E95364E2E3 /* FormatTest.swift */, - BA6C5985BAF3713D3B44503E95F0FB80 /* HasOnlyReadOnly.swift */, - F06C0DAD6966724111ECC6015B132A10 /* List.swift */, - 4F9A53FCDA869FFF602D9C9B68A25226 /* MapTest.swift */, - 9919E54A07648F68B8B5639C3D37053F /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 863792E6E9405D9FA494ED8635CE6C0B /* Model200Response.swift */, - A9B71ED5DCF22D2A22499C3DA4D41762 /* Name.swift */, - DB771F553FC5BEE61938D2B61CDA2CDF /* NumberOnly.swift */, - E9E89ABCCC57336F89BD5C8BB5B4872B /* Order.swift */, - 7295C7D32B7C8F2805DB5D2F3D732F60 /* OuterComposite.swift */, - C868C2F462554B7E170F490CC96D9129 /* OuterEnum.swift */, - 4FBAE8AD90A56C780F6620DBED839BA6 /* Pet.swift */, - 7A625E9EFA94098A17E16D12F9166900 /* ReadOnlyFirst.swift */, - 999653E1FEB8493AD6E227418DFE96D4 /* Return.swift */, - 04D69622D72C7F771C350E30C30020EC /* SpecialModelName.swift */, - D5CFB3D593ECA1A24451987289C9B395 /* StringBooleanMap.swift */, - CBA48E443F18480EDF7990B4B747C01C /* Tag.swift */, - 92066FF1F08D20558637C2DF4F007414 /* TypeHolderDefault.swift */, - BC9640039255992199037E6E249CD4BA /* TypeHolderExample.swift */, - D04FA8D90CF4B9585A67B86642BA750E /* User.swift */, - ABBBF50FA7E854657BDB01185C7DE324 /* XmlItem.swift */, - ); - name = Models; - path = PetstoreClient/Classes/OpenAPIs/Models; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */, - 17869DF432008141F7BA21237323EE4C /* Frameworks */, - 16B2EE9E2B1D8BB1D015243D60C9E749 /* Pods */, - 734399E851D5ED2BCDF59922F6113FFB /* Products */, - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */, - ); - sourceTree = ""; - }; - D15241360159478315C62D19BD01F576 /* Pod */ = { - isa = PBXGroup; - children = ( - A15505355E41E0A84C4DBB54E6722A6D /* AdditionalPropertiesClass.md */, - D616FE27C480390E3487E307807E75E9 /* Animal.md */, - D398056DC91B13AFAA8A0A890BBD89A4 /* AnimalFarm.md */, - 64A2381235D9FBB789BE4EB25C3250C2 /* AnotherFakeAPI.md */, - 3F5E9D64C5F0D5EE4E79CAA59E04172C /* ApiResponse.md */, - 765E58692EB6F8B6798E43E94D7F4094 /* ArrayOfArrayOfNumberOnly.md */, - B8EBE4324A4F4CB8BDA4FA4F6701018A /* ArrayOfNumberOnly.md */, - F86FD53F34987F63B036CD49F23452BD /* ArrayTest.md */, - D153E0692428B3BF93148DCD1E6BC00F /* Capitalization.md */, - 77E7F6EA3ADC6756C75AAB7DBB8AB130 /* Cat.md */, - 262FAE23D33A5D8D25FD3174BD218D2D /* CatAllOf.md */, - EF416EF4C4DA347F1AE75E98A274B44F /* Category.md */, - D0E85B45A1EC6339F7AA30F525EBDF1F /* ClassModel.md */, - 4CE19599ABE0E7AE1F173DBA59E31076 /* Client.md */, - 5386BBE743C361BFF3494F43FE388D82 /* Dog.md */, - 16F3A5E2D2142E1A4325498FC5C53DA0 /* DogAllOf.md */, - 6F0DF3F13D20C6C62978412D37A6E05B /* EnumArrays.md */, - 54E07AE118C3A0E6F7D341C158295E78 /* EnumClass.md */, - 192D52CF963F026FC4AE2398773BBC50 /* EnumTest.md */, - A35F2B8231DE6F6D8A6EA88D06013D6E /* FakeAPI.md */, - BB59CDEC268DB47E3F70C984590CB9D5 /* FakeClassnameTags123API.md */, - 83A28F36D4BF850589924CCEF888C624 /* File.md */, - F2117E56C19928AF73DC30FDAB4534E6 /* FileSchemaTestClass.md */, - AC144D2DF074FA8918C17F3B8D14EE68 /* FormatTest.md */, - A33BB5BD82FE354BE292BE1DE69FE51F /* HasOnlyReadOnly.md */, - DCCC04D0377A09B744232406CEBA5F44 /* List.md */, - 25103330F23FA9F2529571F308093057 /* MapTest.md */, - FA65E6F618E30F8EADF884CD433F2B07 /* MixedPropertiesAndAdditionalPropertiesClass.md */, - 044ED8C312BDDA8A93EF9740A5D6635C /* Model200Response.md */, - 8BAD70A6195E195061F133B7EA8670DA /* Name.md */, - C5BF10812C8B893BE942E8A61095B391 /* NumberOnly.md */, - 07F8EFE5AA6510095D2E009863317CB9 /* Order.md */, - DBD5E9D6569D80DDB9F58CEB3C331F16 /* OuterComposite.md */, - 37D607ECD2F930FE1DB14AAD3D2FA264 /* OuterEnum.md */, - C291EB8933000D10C36F66A93478AA6E /* Pet.md */, - 1ED294369B879E2098B334C63575B7F1 /* PetAPI.md */, - 5FBB2BEE096BE1F26A2F82F63C2A9137 /* PetstoreClient.podspec */, - 355D469521D44A6D4EB3DA64FDE5F7C6 /* README.md */, - 9A359A8A6EF5936FF2065AE9CBDCE44A /* ReadOnlyFirst.md */, - 22770A1D5CBD0B223DC3CDB943156D32 /* Return.md */, - 876786DF3A2782A83F27AAB4DF9B7129 /* SpecialModelName.md */, - 91E22058D6E4F60DC6174011E70A2252 /* StoreAPI.md */, - 67CAA50227E3326A9816E28A7CD74A9C /* StringBooleanMap.md */, - A87F3C66E22CB7E45520173CC79433C5 /* Tag.md */, - 75855F6DC341E04EB8A436C5A5516151 /* TypeHolderDefault.md */, - E3A91C056032AA15B2DE57D4907F5BC7 /* TypeHolderExample.md */, - 0378F66031FCAEA1771BE52BF95BBF3A /* User.md */, - 4536398A85D1D5BBB39C3849096317B8 /* UserAPI.md */, - ); - name = Pod; - sourceTree = ""; - }; - D7B7EC664DDCDD9A4918BBBD9B9BDEBC /* APIs */ = { - isa = PBXGroup; - children = ( - DDDADBC0BB257C4A516773B0ECA96196 /* AnotherFakeAPI.swift */, - B9EC4A49FB365F7019625F4C1BBCB292 /* FakeAPI.swift */, - 3AAB640C655ED6CF3F5D5C2314B9FB6B /* FakeClassnameTags123API.swift */, - 3A5A74AC7AF5B77CA1BD76B82062D5D3 /* PetAPI.swift */, - A4A146F2131F799FABD6835B1CFDD347 /* StoreAPI.swift */, - 97A2C094645F6A60D5A7F4E894EE23BD /* UserAPI.swift */, - ); - name = APIs; - path = PetstoreClient/Classes/OpenAPIs/APIs; - sourceTree = ""; - }; - E744BC5198F66515CCC110C0907A7EB9 /* Support Files */ = { - isa = PBXGroup; - children = ( - 224E8CF92D8CEAABA9CEBF326A1F3592 /* PetstoreClient.modulemap */, - 4CD9592220A0204D65C56DC92A81DA49 /* PetstoreClient.xcconfig */, - 2C65DCB83B644ABFF723D9EDA2FB9E0C /* PetstoreClient-dummy.m */, - 1FE541DC5CA53C88DF7EBA29B807D613 /* PetstoreClient-Info.plist */, - A3B2B506FC78CDF88268C906E6638091 /* PetstoreClient-prefix.pch */, - 7083C42A5DC6552DCB8F1A1E03CCA816 /* PetstoreClient-umbrella.h */, - ); - name = "Support Files"; - path = "SwaggerClientTests/Pods/Target Support Files/PetstoreClient"; - sourceTree = ""; - }; - EEC4E2560D8C158B5E6D73FD3A7282F7 /* iOS */ = { - isa = PBXGroup; - children = ( - 7D20359CE0E73D6BC8E83D987C902D2E /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3268A0F9B56A3813E4AEC25C8CD0A4D3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 687C2F140C3AFB4F2FA5147EF9790F1D /* Pods-SwaggerClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3F6DDD6D33EC31E5C134A39FD5A16C7F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 7A00D62842DD238AC0457B7743459143 /* AnyPromise.h in Headers */, - 26DD5BC612DBFC51C9A2EC25AF219566 /* fwd.h in Headers */, - 1C035F0DFD555DC8249BE265F89C3071 /* PromiseKit-umbrella.h in Headers */, - 975E21814E0F788DF6A6E5DE986229E6 /* PromiseKit.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B77B7E691107B1EA5EE14B6E55E08D23 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - FFA9DEB1EEA584789F46BBD344961268 /* PetstoreClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 231FDEAF460449DE9E4B3F7B823FD3A3 /* Pods-SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2191953FE475159265C17FB5EE76C4FD /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */; - buildPhases = ( - 3268A0F9B56A3813E4AEC25C8CD0A4D3 /* Headers */, - 6085E5872EE87CAE6BF6A38C6034EF63 /* Sources */, - F7179B3AD176A6A966429334C5123C54 /* Frameworks */, - 5DBF8C2B793EFCFD59F448F0F6F195CB /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 104B105982370A7B9131E436EA78FECF /* PBXTargetDependency */, - BCF2E1EDC25542296AD484069283D527 /* PBXTargetDependency */, - 881BE8BEE1BCB47A20F79F7E463C2E17 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClient"; - productName = "Pods-SwaggerClient"; - productReference = 61A1A22EC0CE765486E1DD7D915F1B67 /* Pods_SwaggerClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */, - A1C8B029F600160149A2404C342F6E50 /* Sources */, - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */, - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = BE70D2A78B09C7BC49E8D639EB88D8E7 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */; - buildPhases = ( - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */, - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */, - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */, - C2801E627F662CD786BE9F42773CBECF /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClientTests"; - productName = "Pods-SwaggerClientTests"; - productReference = 44CC620F46D960EF0B6F97F430F5FC1E /* Pods_SwaggerClientTests.framework */; - productType = "com.apple.product-type.framework"; - }; - BB3D3DCE720C235EF143F0E12FF69CA8 /* PromiseKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3987909F169C9B57D460372E7FA7D4C2 /* Build configuration list for PBXNativeTarget "PromiseKit" */; - buildPhases = ( - 3F6DDD6D33EC31E5C134A39FD5A16C7F /* Headers */, - 4D751F3449218FB77503D67042F9D0AF /* Sources */, - DBBF761421A799D7A8BD2A2A66AA2742 /* Frameworks */, - 4D173F63C3AAD95EBBF2E67E50A776B7 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PromiseKit; - productName = PromiseKit; - productReference = 29CE11B261C3803DAC95698C526C28F5 /* PromiseKit.framework */; - productType = "com.apple.product-type.framework"; - }; - F1D420F0D4A15B40A58DAEF987DD36C3 /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6CA821BA53BCC09E04DDA621C18E2CD7 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - B77B7E691107B1EA5EE14B6E55E08D23 /* Headers */, - E2E80565ACA4BF140CCB71BF3BCCAC59 /* Sources */, - 810ABC6D498290E21B9332A43B49C990 /* Frameworks */, - D82B8B0EB0022FBE167BF08C8EA8B48F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C03AB392CD24547D8AFE0D2BDE56D2D0 /* PBXTargetDependency */, - 2B474439E57C1B019F32DB682991704B /* PBXTargetDependency */, - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 81B75710FF1D97F3BBA8CF87E5D7CFDB /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 734399E851D5ED2BCDF59922F6113FFB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */, - F1D420F0D4A15B40A58DAEF987DD36C3 /* PetstoreClient */, - 231FDEAF460449DE9E4B3F7B823FD3A3 /* Pods-SwaggerClient */, - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */, - BB3D3DCE720C235EF143F0E12FF69CA8 /* PromiseKit */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4D173F63C3AAD95EBBF2E67E50A776B7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5DBF8C2B793EFCFD59F448F0F6F195CB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C2801E627F662CD786BE9F42773CBECF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D82B8B0EB0022FBE167BF08C8EA8B48F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4D751F3449218FB77503D67042F9D0AF /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 51909107FAE52A0D1C8AE11B65DE08E7 /* after.m in Sources */, - 8F063138AEB0CBD41F723D7C8C6C9A1C /* after.swift in Sources */, - 9D8C37EA1313F9BBDD200D8FCB93CCFA /* AnyPromise.m in Sources */, - D7EAFEBB963D9B9C8BC00951572B8571 /* AnyPromise.swift in Sources */, - 5CAA0F2AB773CCD6E62848CC02470C8E /* dispatch_promise.m in Sources */, - 910364E886094608091F77F9DBF1AE2E /* DispatchQueue+Promise.swift in Sources */, - FB407559577B3E19CAF1D3E75D4A7AAE /* Error.swift in Sources */, - 7B14AABEA6084A6CAAD77F02D700A436 /* GlobalState.m in Sources */, - B645EC01163024890ADE8D5C9EAF8EE5 /* hang.m in Sources */, - 9B72FB26EC959DD96FDBB044A9C3C525 /* join.m in Sources */, - 47E148EE42FDCD51C69EA7EB322496BD /* join.swift in Sources */, - F7E9E11EFB5556B4D6033CC522502126 /* Promise+AnyPromise.swift in Sources */, - EC94B1BA635C6723DCFC17912BE0C588 /* Promise+Properties.swift in Sources */, - 40AE1B240B27734094AB39EACA233A0D /* Promise.swift in Sources */, - 726DCC0BBB21F735986DF5C9F3DCBEF6 /* PromiseKit-dummy.m in Sources */, - FE76A7AA575836F1EE950DDFEAE2CF7B /* race.swift in Sources */, - B433389CCA40FDC6A02956C940F80112 /* State.swift in Sources */, - 317719762D81596E1DD4BC4786311DF5 /* when.m in Sources */, - C0887203727473C7A8A9084437976426 /* when.swift in Sources */, - B67DB5083264B8C8896D3DF3F5FE2E20 /* wrap.swift in Sources */, - 9FBC90C0E307ADB8CD2F3CF5C0D3C8EE /* Zalgo.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6085E5872EE87CAE6BF6A38C6034EF63 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 39CFC0AF6016C70C5EA5345DFE44FEB4 /* Pods-SwaggerClient-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A1C8B029F600160149A2404C342F6E50 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */, - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */, - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */, - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */, - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */, - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */, - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */, - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */, - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */, - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */, - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */, - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */, - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */, - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */, - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */, - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */, - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */, - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E2E80565ACA4BF140CCB71BF3BCCAC59 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BA93909A110EB66F7167C3B326A5D2B0 /* AdditionalPropertiesClass.swift in Sources */, - B394CD18FC054147A348F808EAC8139A /* AlamofireImplementations.swift in Sources */, - 6FDC9E3B9907CF35FC038BD79A7DE2AC /* Animal.swift in Sources */, - BF7C810E194570D018B13127190459E5 /* AnimalFarm.swift in Sources */, - 2CDAC18FCB90313EFA1B02A75C83E0EE /* AnotherFakeAPI.swift in Sources */, - D1DA04105E2DD51C51C44E841F8032E1 /* APIHelper.swift in Sources */, - C13E3FEC49E848F2CC5794FF93065029 /* ApiResponse.swift in Sources */, - 091CC6D7CFF9374E41B1C6CB19B0E97B /* APIs.swift in Sources */, - BF0B6C073FB6099B4BB906527BFA43FD /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 6FACE6A9C43083DBB5033317AFF9AE31 /* ArrayOfNumberOnly.swift in Sources */, - C94A6EA921453BFA4C082DFAC9C1C7EC /* ArrayTest.swift in Sources */, - 636C75AD8D045A1687F83CA89AF49A86 /* Capitalization.swift in Sources */, - 9A30D9B1EE2D5A3AC76AE389E0520352 /* Cat.swift in Sources */, - CE18C1FBB0A93582860FFAF71E056F6A /* CatAllOf.swift in Sources */, - B511D9CED36E092C88AB629C511BD1E7 /* Category.swift in Sources */, - F1620139EC36E6F5E4A98718BC41407D /* ClassModel.swift in Sources */, - F47A5B894FD1450562D373B1D33D6A61 /* Client.swift in Sources */, - FFEE16A611067AB36CB750E960FEC9E8 /* CodableHelper.swift in Sources */, - E5C45F26D8419C4BE5642B1E321894DD /* Configuration.swift in Sources */, - 4D4DCE405773A7673D0199A93FE9DE62 /* Dog.swift in Sources */, - C1245D0FDDA57F8CEAA283B028D09D09 /* DogAllOf.swift in Sources */, - F3A7212660A85B8AA43AD950729FBEA4 /* EnumArrays.swift in Sources */, - BC5A794B04B4DEA6F0473FD3E8952BDC /* EnumClass.swift in Sources */, - 8766DA6D3446770DAAF3D68E154E61BD /* EnumTest.swift in Sources */, - C80C11BB589CAA31898343105C285051 /* Extensions.swift in Sources */, - 410EC2309E393CB88C39529E7CF18811 /* FakeAPI.swift in Sources */, - 87D949C0631CC0CB929C69CA7D925B14 /* FakeClassnameTags123API.swift in Sources */, - ED06569D6C27D747E3E98ACF2F3CF0D8 /* File.swift in Sources */, - 8FC55DB96BAADB3B12B0DAB26332E40A /* FileSchemaTestClass.swift in Sources */, - BFB77FC4FC5E7D0680CE25025D0F818F /* FormatTest.swift in Sources */, - E160BF1E02EA978930609C95C93EEF16 /* HasOnlyReadOnly.swift in Sources */, - 0CD12250A91D4CBC55393495F06775B2 /* JSONEncodableEncoding.swift in Sources */, - BE5BBDF15A7C0C9CF88A0268815B8202 /* JSONEncodingHelper.swift in Sources */, - 7B847086909F16338E32D2290866777C /* List.swift in Sources */, - 6FC066D0A7B565C871A65F540E37735F /* MapTest.swift in Sources */, - 67D2462106E9DB4C3D16D5F521C99250 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 24406F8A6355B7BEC2B072D3B17ECD47 /* Model200Response.swift in Sources */, - 28A9B496DBCD33380CC3D4CC155F524E /* Models.swift in Sources */, - 2E29AA764BF206DE155112E5BC4939E8 /* Name.swift in Sources */, - B4A2386087F99886C5CC944C2A5B58C7 /* NumberOnly.swift in Sources */, - A64FF2ED84938912BA601B01121B8E23 /* Order.swift in Sources */, - 36C038AE1EFBD5D95D3B3102A737DFDE /* OuterComposite.swift in Sources */, - 77A253AD92BDAF5465031F9225A13F8D /* OuterEnum.swift in Sources */, - 8D53C0725D4DE490174105C56C981189 /* Pet.swift in Sources */, - 3593A7A85BE6F92BC7BEA765C89B1076 /* PetAPI.swift in Sources */, - 7D3B1A7247A69E34E48CED53C5145C34 /* PetstoreClient-dummy.m in Sources */, - FFA407C091EEE5260E0C08655A0947EB /* ReadOnlyFirst.swift in Sources */, - 6AF9A6069796DA5834FEEAFD7221874F /* Return.swift in Sources */, - 526815FE7172F8568A44A8F4D9139970 /* SpecialModelName.swift in Sources */, - 64B570EF5C1FF1379F8036D8FCCB63EF /* StoreAPI.swift in Sources */, - B652075D043B2D37A0B1FA649065FC3F /* StringBooleanMap.swift in Sources */, - DF9AFA6422C6A99873955D59EF32DFAD /* Tag.swift in Sources */, - 02CB7A74792FE71D55618B1FD68A84F2 /* TypeHolderDefault.swift in Sources */, - 7C0B7D57C5FED546B89AF6A45F276C36 /* TypeHolderExample.swift in Sources */, - 13E3586ABCE7938EB3CC6D51BAD31B42 /* User.swift in Sources */, - 5C5EA546013E597E3D52DD83B5C92D13 /* UserAPI.swift in Sources */, - 3B14FC1EA44225994453AA123F4262D0 /* XmlItem.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 104B105982370A7B9131E436EA78FECF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = 8457C9F78C76721ECB8A14CE04BB0A4B /* PBXContainerItemProxy */; - }; - 2B474439E57C1B019F32DB682991704B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PromiseKit; - target = BB3D3DCE720C235EF143F0E12FF69CA8 /* PromiseKit */; - targetProxy = FA9F1AC6C8600F3A18D9309C97C11B70 /* PBXContainerItemProxy */; - }; - 881BE8BEE1BCB47A20F79F7E463C2E17 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PromiseKit; - target = BB3D3DCE720C235EF143F0E12FF69CA8 /* PromiseKit */; - targetProxy = 546F8B9CAB0CCCB3CAA12EAFD808A106 /* PBXContainerItemProxy */; - }; - BCF2E1EDC25542296AD484069283D527 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PetstoreClient; - target = F1D420F0D4A15B40A58DAEF987DD36C3 /* PetstoreClient */; - targetProxy = 46A96CCA6A1D1F8D0F013D7285FE0374 /* PBXContainerItemProxy */; - }; - C03AB392CD24547D8AFE0D2BDE56D2D0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = CA4BC4C012806840D9DC2B2430920C98 /* PBXContainerItemProxy */; - }; - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Pods-SwaggerClient"; - target = 231FDEAF460449DE9E4B3F7B823FD3A3 /* Pods-SwaggerClient */; - targetProxy = FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0F9DE41FC108FC05B463FCAC96ED8EF9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 21979AE1790135C30E0899E08565E57B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 41268AF552E2DC6A5873C87C81174F7D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 891AFA4406EB2D944EEA7D0DB1A042FC /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 553C8AFAF42C60331D9FA03EEF295F28 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 5A7FB8487CCD0B9D57F2BDB6B7A98A95 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4CD9592220A0204D65C56DC92A81DA49 /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 7A138A57D62AD3F0FEBC72142392B2CD /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A345BCBDE6C296957161A3E85A47A280 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 891AFA4406EB2D944EEA7D0DB1A042FC /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B1EA1C390BCDF899D7871D750D72F598 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B758FBEC27C09CD6E60596DDF8B1CDBB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - D4426CC727889C4CB9BCE3EB60935D8B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 024B6CCE54665B2B8C5A6A361996F330 /* PromiseKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - E57FA9A7602457E80A9F159F84427954 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4CD9592220A0204D65C56DC92A81DA49 /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - EE29BBD317E28565EB50045103465E23 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 024B6CCE54665B2B8C5A6A361996F330 /* PromiseKit.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/PromiseKit-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - PRODUCT_MODULE_NAME = PromiseKit; - PRODUCT_NAME = PromiseKit; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2191953FE475159265C17FB5EE76C4FD /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 553C8AFAF42C60331D9FA03EEF295F28 /* Debug */, - B1EA1C390BCDF899D7871D750D72F598 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3987909F169C9B57D460372E7FA7D4C2 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D4426CC727889C4CB9BCE3EB60935D8B /* Debug */, - EE29BBD317E28565EB50045103465E23 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0F9DE41FC108FC05B463FCAC96ED8EF9 /* Debug */, - B758FBEC27C09CD6E60596DDF8B1CDBB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6CA821BA53BCC09E04DDA621C18E2CD7 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E57FA9A7602457E80A9F159F84427954 /* Debug */, - 5A7FB8487CCD0B9D57F2BDB6B7A98A95 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7A138A57D62AD3F0FEBC72142392B2CD /* Debug */, - 21979AE1790135C30E0899E08565E57B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 41268AF552E2DC6A5873C87C81174F7D /* Debug */, - A345BCBDE6C296957161A3E85A47A280 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE deleted file mode 100644 index c547fa84913..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/README.md b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/README.md deleted file mode 100644 index 473296faa43..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/README.md +++ /dev/null @@ -1,134 +0,0 @@ -![PromiseKit](http://promisekit.org/public/img/logo-tight.png) - -![badge-pod] ![badge-languages] ![badge-pms] ![badge-platforms] [![Build Status](https://travis-ci.org/mxcl/PromiseKit.svg?branch=master)](https://travis-ci.org/mxcl/PromiseKit) - -[繁體中文](README.zh_Hant.md), [简体中文](README.zh_CN.md) - ---- - -Promises simplify asynchronous programming, freeing you up to focus on the more -important things. They are easy to learn, easy to master and result in clearer, -more readable code. Your co-workers will thank you. - -```swift -UIApplication.shared.isNetworkActivityIndicatorVisible = true - -firstly { - when(URLSession.dataTask(with: url).asImage(), CLLocationManager.promise()) -}.then { image, location -> Void in - self.imageView.image = image - self.label.text = "\(location)" -}.always { - UIApplication.shared.isNetworkActivityIndicatorVisible = false -}.catch { error in - self.show(UIAlertController(for: error), sender: self) -} -``` - -PromiseKit is a thoughtful and complete implementation of promises for any -platform with a `swiftc`, it has *excellent* Objective-C bridging and -*delightful* specializations for iOS, macOS, tvOS and watchOS. - -# Quick Start - -In your [Podfile]: - -```ruby -use_frameworks! - -target "Change Me!" do - pod "PromiseKit", "~> 4.4" -end -``` - -PromiseKit 4 supports Xcode 8.1, 8.2, 8.3 and 9.0; Swift 3.0, 3.1, 3.2 and 4.0; iOS, macOS, tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM; ([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)). - -For Carthage, SwiftPM, etc., or for instructions when using older Swifts or -Xcodes see our [Installation Guide](Documentation/Installation.md). - -# Documentation - -* Handbook - * [Getting Started](Documentation/GettingStarted.md) - * [Promises: Common Patterns](Documentation/CommonPatterns.md) - * [Frequently Asked Questions](Documentation/FAQ.md) -* Manual - * [Installation Guide](Documentation/Installation.md) - * [Objective-C Guide](Documentation/ObjectiveC.md) - * [Troubleshooting](Documentation/Troubleshooting.md) (eg. solutions to common compile errors) - * [Appendix](Documentation/Appendix.md) - -If you are looking for a function’s documentation, then please note -[our sources](Sources/) are thoroughly documented. - -# Extensions - -Promises are only as useful as the asynchronous tasks they represent, thus we -have converted (almost) all of Apple’s APIs to promises. The default CocoaPod -comes with promises for UIKit and Foundation, the rest can be installed by -specifying additional subspecs in your `Podfile`, eg: - -```ruby -pod "PromiseKit/MapKit" # MKDirections().promise().then { /*…*/ } -pod "PromiseKit/CoreLocation" # CLLocationManager.promise().then { /*…*/ } -``` - -All our extensions are separate repositories at the [PromiseKit organization]. - -## Choose Your Networking Library - -Promise chains are commonly started with networking, thus we offer multiple -options: [Alamofire], [OMGHTTPURLRQ] and of course (vanilla) `NSURLSession`: - -```swift -// pod 'PromiseKit/Alamofire' -// https://github.com/PromiseKit/Alamofire -Alamofire.request("http://example.com", method: .post).responseJSON().then { json in - //… -}.catch { error in - //… -} - -// pod 'PromiseKit/OMGHTTPURLRQ' -// https://github.com/PromiseKit/OMGHTTPURLRQ -URLSession.POST("http://example.com").asDictionary().then { json in - //… -}.catch { error in - //… -} - -// pod 'PromiseKit/Foundation' -// https://github.com/PromiseKit/Foundation -URLSession.shared.dataTask(url).asDictionary().then { json in - // … -}.catch { error in - //… -} -``` - -Nobody ever got fired for using Alamofire, but at the end of the day, it’s -just a small wrapper around `NSURLSession`. OMGHTTPURLRQ supplements -`NSURLRequest` to make generating REST style requests easier, and the PromiseKit -extensions extend `NSURLSession` to make OMG usage more convenient. But since a -while now most servers accept JSON, so writing a simple API class that uses -vanilla `NSURLSession` and our promises is not hard, and gives you the most -control with the fewest black-boxes. - -The choice is yours. - -# Support - -Ask your question at our [Gitter chat channel] or on [our bug tracker]. - - -[badge-pod]: https://img.shields.io/cocoapods/v/PromiseKit.svg?label=version -[badge-pms]: https://img.shields.io/badge/supports-CocoaPods%20%7C%20Carthage%20%7C%20SwiftPM-green.svg -[badge-languages]: https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-orange.svg -[badge-platforms]: https://img.shields.io/badge/platforms-macOS%20%7C%20iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-lightgrey.svg -[badge-mit]: https://img.shields.io/badge/license-MIT-blue.svg -[OMGHTTPURLRQ]: https://github.com/mxcl/OMGHTTPURLRQ -[Alamofire]: http://alamofire.org -[PromiseKit organization]: https://github.com/PromiseKit -[Gitter chat channel]: https://gitter.im/mxcl/PromiseKit -[our bug tracker]: https://github.com/mxcl/PromiseKit/issues/new -[Podfile]: https://guides.cocoapods.org/syntax/podfile.html diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h deleted file mode 100644 index 756ba7b7b4d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h +++ /dev/null @@ -1,38 +0,0 @@ -@import Foundation.NSError; -@import Foundation.NSPointerArray; - -#if TARGET_OS_IPHONE - #define NSPointerArrayMake(N) ({ \ - NSPointerArray *aa = [NSPointerArray strongObjectsPointerArray]; \ - aa.count = N; \ - aa; \ - }) -#else - static inline NSPointerArray * __nonnull NSPointerArrayMake(NSUInteger count) { - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSPointerArray *aa = [[NSPointerArray class] respondsToSelector:@selector(strongObjectsPointerArray)] - ? [NSPointerArray strongObjectsPointerArray] - : [NSPointerArray pointerArrayWithStrongObjects]; - #pragma clang diagnostic pop - aa.count = count; - return aa; - } -#endif - -#define IsError(o) [o isKindOfClass:[NSError class]] -#define IsPromise(o) [o isKindOfClass:[AnyPromise class]] - -#import "AnyPromise.h" - -@interface AnyPromise (Swift) -- (AnyPromise * __nonnull)__thenOn:(__nonnull dispatch_queue_t)q execute:(id __nullable (^ __nonnull)(id __nullable))body; -- (AnyPromise * __nonnull)__catchOn:(__nonnull dispatch_queue_t)q withPolicy:(PMKCatchPolicy)policy execute:(id __nullable (^ __nonnull)(id __nullable))body; -- (AnyPromise * __nonnull)__alwaysOn:(__nonnull dispatch_queue_t)q execute:(void (^ __nonnull)(void))body; -- (void)__pipe:(void(^ __nonnull)(__nullable id))body; -- (AnyPromise * __nonnull)initWithResolverBlock:(void (^ __nonnull)(PMKResolver __nonnull))resolver; -@end - -extern NSError * __nullable PMKProcessUnhandledException(id __nonnull thrown); - -@class PMKArray; diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h deleted file mode 100644 index 43f8feeef01..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h +++ /dev/null @@ -1,295 +0,0 @@ -#import -#import -#import "fwd.h" - -typedef void (^PMKResolver)(id __nullable) NS_REFINED_FOR_SWIFT; - -typedef NS_ENUM(NSInteger, PMKCatchPolicy) { - PMKCatchPolicyAllErrors, - PMKCatchPolicyAllErrorsExceptCancellation -} NS_SWIFT_NAME(CatchPolicy); - - -#if __has_include("PromiseKit-Swift.h") - #pragma clang diagnostic push - #pragma clang diagnostic ignored"-Wdocumentation" - #import "PromiseKit-Swift.h" - #pragma clang diagnostic pop -#else - // this hack because `AnyPromise` is Swift, but we add - // our own methods via the below category. This hack is - // only required while building PromiseKit since, once - // built, the generated -Swift header exists. - - __attribute__((objc_subclassing_restricted)) __attribute__((objc_runtime_name("AnyPromise"))) - @interface AnyPromise : NSObject - @property (nonatomic, readonly) BOOL resolved; - @property (nonatomic, readonly) BOOL pending; - @property (nonatomic, readonly) __nullable id value; - + (instancetype __nonnull)promiseWithResolverBlock:(void (^ __nonnull)(__nonnull PMKResolver))resolveBlock; - + (instancetype __nonnull)promiseWithValue:(__nullable id)value; - @end -#endif - - -@interface AnyPromise (obj) - -@property (nonatomic, readonly) __nullable id value; - -/** - The provided block is executed when its receiver is resolved. - - If you provide a block that takes a parameter, the value of the receiver will be passed as that parameter. - - [NSURLSession GET:url].then(^(NSData *data){ - // do something with data - }); - - @return A new promise that is resolved with the value returned from the provided block. For example: - - [NSURLSession GET:url].then(^(NSData *data){ - return data.length; - }).then(^(NSNumber *number){ - //… - }); - - @warning *Important* The block passed to `then` may take zero, one, two or three arguments, and return an object or return nothing. This flexibility is why the method signature for then is `id`, which means you will not get completion for the block parameter, and must type it yourself. It is safe to type any block syntax here, so to start with try just: `^{}`. - - @warning *Important* If an `NSError` or `NSString` is thrown inside your block, or you return an `NSError` object the next `Promise` will be rejected. See `catch` for documentation on error handling. - - @warning *Important* `then` is always executed on the main queue. - - @see thenOn - @see thenInBackground -*/ -- (AnyPromise * __nonnull (^ __nonnull)(id __nonnull))then NS_REFINED_FOR_SWIFT; - - -/** - The provided block is executed on the default queue when the receiver is fulfilled. - - This method is provided as a convenience for `thenOn`. - - @see then - @see thenOn -*/ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))thenInBackground NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed on the dispatch queue of your choice when the receiver is fulfilled. - - @see then - @see thenInBackground -*/ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))thenOn NS_REFINED_FOR_SWIFT; - -#ifndef __cplusplus -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on the main queue. - - @warning *Note* Cancellation errors are not caught. - - @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchWithPolicy. - - @see catchWithPolicy -*/ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catch NS_REFINED_FOR_SWIFT; -#endif - -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on the global background queue. - - @warning *Note* Cancellation errors are not caught. - - @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchWithPolicy. - - @see catchWithPolicy - */ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catchInBackground NS_REFINED_FOR_SWIFT; - - -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on queue provided. - - @warning *Note* Cancellation errors are not caught. - - @see catchWithPolicy - */ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))catchOn NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed when the receiver is rejected with the specified policy. - - Specify the policy with which to catch as the first parameter to your block. Either for all errors, or all errors *except* cancellation errors. - - @see catch -*/ -- (AnyPromise * __nonnull(^ __nonnull)(PMKCatchPolicy, id __nonnull))catchWithPolicy NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed when the receiver is rejected with the specified policy. - - Specify the policy with which to catch as the first parameter to your block. Either for all errors, or all errors *except* cancellation errors. - - The provided block always runs on queue provided. - - @see catch - */ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, PMKCatchPolicy, id __nonnull))catchOnWithPolicy NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed when the receiver is resolved. - - The provided block always runs on the main queue. - - @see alwaysOn -*/ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))always NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed on the dispatch queue of your choice when the receiver is resolved. - - @see always - */ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, dispatch_block_t __nonnull))alwaysOn NS_REFINED_FOR_SWIFT; - -/// @see always -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))finally __attribute__((deprecated("Use always"))); -/// @see alwaysOn -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull, dispatch_block_t __nonnull))finallyOn __attribute__((deprecated("Use always"))); - -/** - Create a new promise with an associated resolver. - - Use this method when wrapping asynchronous code that does *not* use - promises so that this code can be used in promise chains. Generally, - prefer `promiseWithResolverBlock:` as the resulting code is more elegant. - - PMKResolver resolve; - AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; - - // later - resolve(@"foo"); - - @param resolver A reference to a block pointer of PMKResolver type. - You can then call your resolver to resolve this promise. - - @return A new promise. - - @warning *Important* The resolver strongly retains the promise. - - @see promiseWithResolverBlock: -*/ -- (instancetype __nonnull)initWithResolver:(PMKResolver __strong __nonnull * __nonnull)resolver NS_REFINED_FOR_SWIFT; - -@end - - - -@interface AnyPromise (Unavailable) - -- (instancetype __nonnull)init __attribute__((unavailable("It is illegal to create an unresolvable promise."))); -+ (instancetype __nonnull)new __attribute__((unavailable("It is illegal to create an unresolvable promise."))); - -@end - - - -typedef void (^PMKAdapter)(id __nullable, NSError * __nullable) NS_REFINED_FOR_SWIFT; -typedef void (^PMKIntegerAdapter)(NSInteger, NSError * __nullable) NS_REFINED_FOR_SWIFT; -typedef void (^PMKBooleanAdapter)(BOOL, NSError * __nullable) NS_REFINED_FOR_SWIFT; - - -@interface AnyPromise (Adapters) - -/** - Create a new promise by adapting an existing asynchronous system. - - The pattern of a completion block that passes two parameters, the first - the result and the second an `NSError` object is so common that we - provide this convenience adapter to make wrapping such systems more - elegant. - - return [PMKPromise promiseWithAdapterBlock:^(PMKAdapter adapter){ - PFQuery *query = [PFQuery …]; - [query findObjectsInBackgroundWithBlock:adapter]; - }]; - - @warning *Important* If both parameters are nil, the promise fulfills, - if both are non-nil the promise rejects. This is per the convention. - - @see http://promisekit.org/sealing-your-own-promises/ - */ -+ (instancetype __nonnull)promiseWithAdapterBlock:(void (^ __nonnull)(PMKAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -/** - Create a new promise by adapting an existing asynchronous system. - - Adapts asynchronous systems that complete with `^(NSInteger, NSError *)`. - NSInteger will cast to enums provided the enum has been wrapped with - `NS_ENUM`. All of Apple’s enums are, so if you find one that hasn’t you - may need to make a pull-request. - - @see promiseWithAdapter - */ -+ (instancetype __nonnull)promiseWithIntegerAdapterBlock:(void (^ __nonnull)(PMKIntegerAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -/** - Create a new promise by adapting an existing asynchronous system. - - Adapts asynchronous systems that complete with `^(BOOL, NSError *)`. - - @see promiseWithAdapter - */ -+ (instancetype __nonnull)promiseWithBooleanAdapterBlock:(void (^ __nonnull)(PMKBooleanAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -@end - - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Whenever resolving a promise you may resolve with a tuple, eg. - returning from a `then` or `catch` handler or resolving a new promise. - - Consumers of your Promise are not compelled to consume any arguments and - in fact will often only consume the first parameter. Thus ensure the - order of parameters is: from most-important to least-important. - - Currently PromiseKit limits you to THREE parameters to the manifold. -*/ -#define PMKManifold(...) __PMKManifold(__VA_ARGS__, 3, 2, 1) -#define __PMKManifold(_1, _2, _3, N, ...) __PMKArrayWithCount(N, _1, _2, _3) -extern id __nonnull __PMKArrayWithCount(NSUInteger, ...); - -#ifdef __cplusplus -} // Extern C -#endif - - -@interface AnyPromise (Deprecations) - -+ (instancetype __nonnull)new:(__nullable id)resolvers __attribute__((unavailable("See +promiseWithResolverBlock:"))); -+ (instancetype __nonnull)when:(__nullable id)promises __attribute__((unavailable("See PMKWhen()"))); -+ (instancetype __nonnull)join:(__nullable id)promises __attribute__((unavailable("See PMKJoin()"))); - -@end - - -__attribute__((unavailable("See AnyPromise"))) -@interface PMKPromise -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m deleted file mode 100644 index c0f81f4c30b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m +++ /dev/null @@ -1,141 +0,0 @@ -#import "PMKCallVariadicBlock.m" -#import "AnyPromise+Private.h" - -extern dispatch_queue_t PMKDefaultDispatchQueue(void); - -NSString *const PMKErrorDomain = @"PMKErrorDomain"; - - -@implementation AnyPromise (objc) - -- (instancetype)initWithResolver:(PMKResolver __strong *)resolver { - return [[self class] promiseWithResolverBlock:^(PMKResolver resolve){ - *resolver = resolve; - }]; -} - -- (AnyPromise *(^)(id))then { - return ^(id block) { - return [self __thenOn:PMKDefaultDispatchQueue() execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))thenOn { - return ^(dispatch_queue_t queue, id block) { - return [self __thenOn:queue execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))thenInBackground { - return ^(id block) { - return [self __thenOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))catchOn { - return ^(dispatch_queue_t q, id block) { - return [self __catchOn:q withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catch { - return ^(id block) { - return [self __catchOn:PMKDefaultDispatchQueue() withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catchInBackground { - return ^(id block) { - return [self __catchOn:dispatch_get_global_queue(0, 0) withPolicy:PMKCatchPolicyAllErrorsExceptCancellation execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, PMKCatchPolicy, id))catchOnWithPolicy { - return ^(dispatch_queue_t q, PMKCatchPolicy policy, id block) { - return [self __catchOn:q withPolicy:policy execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(PMKCatchPolicy, id))catchWithPolicy { - return ^(PMKCatchPolicy policy, id block) { - return [self __catchOn:PMKDefaultDispatchQueue() withPolicy:policy execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_block_t))always { - return ^(dispatch_block_t block) { - return [self __alwaysOn:PMKDefaultDispatchQueue() execute:block]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, dispatch_block_t))alwaysOn { - return ^(dispatch_queue_t queue, dispatch_block_t block) { - return [self __alwaysOn:queue execute:block]; - }; -} - -@end - - - -@implementation AnyPromise (Adapters) - -+ (instancetype)promiseWithAdapterBlock:(void (^)(PMKAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(id value, id error){ - resolve(error ?: value); - }); - }]; -} - -+ (instancetype)promiseWithIntegerAdapterBlock:(void (^)(PMKIntegerAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(NSInteger value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -+ (instancetype)promiseWithBooleanAdapterBlock:(void (^)(PMKBooleanAdapter adapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(BOOL value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -- (id)value { - id obj = [self valueForKey:@"__value"]; - - if ([obj isKindOfClass:[PMKArray class]]) { - return obj[0]; - } else { - return obj; - } -} - -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift deleted file mode 100644 index 251659bc582..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift +++ /dev/null @@ -1,278 +0,0 @@ -import Foundation - -/** - AnyPromise is an Objective-C compatible promise. -*/ -@objc(AnyPromise) public class AnyPromise: NSObject { - let state: State - - /** - - Returns: A new `AnyPromise` bound to a `Promise`. - */ - required public init(_ bridge: Promise) { - state = bridge.state - } - - /// hack to ensure Swift picks the right initializer for each of the below - private init(force: Promise) { - state = force.state - } - - /** - - Returns: A new `AnyPromise` bound to a `Promise`. - */ - public convenience init(_ bridge: Promise) { - self.init(force: bridge.then(on: zalgo) { $0 }) - } - - /** - - Returns: A new `AnyPromise` bound to a `Promise`. - */ - convenience public init(_ bridge: Promise) { - self.init(force: bridge.then(on: zalgo) { $0 }) - } - - /** - - Returns: A new `AnyPromise` bound to a `Promise`. - - Note: A “void” `AnyPromise` has a value of `nil`. - */ - convenience public init(_ bridge: Promise) { - self.init(force: bridge.then(on: zalgo) { nil }) - } - - /** - Bridges an `AnyPromise` to a `Promise`. - - - Note: AnyPromises fulfilled with `PMKManifold` lose all but the first fulfillment object. - - Remark: Could not make this an initializer of `Promise` due to generics issues. - */ - public func asPromise() -> Promise { - return Promise(sealant: { resolve in - state.pipe { resolution in - switch resolution { - case .rejected: - resolve(resolution) - case .fulfilled: - let obj = (self as AnyObject).value(forKey: "value") - resolve(.fulfilled(obj)) - } - } - }) - } - - /// - See: `Promise.then()` - public func then(on q: DispatchQueue = .default, execute body: @escaping (Any?) throws -> T) -> Promise { - return asPromise().then(on: q, execute: body) - } - - /// - See: `Promise.then()` - public func then(on q: DispatchQueue = .default, execute body: @escaping (Any?) throws -> AnyPromise) -> Promise { - return asPromise().then(on: q, execute: body) - } - - /// - See: `Promise.then()` - public func then(on q: DispatchQueue = .default, execute body: @escaping (Any?) throws -> Promise) -> Promise { - return asPromise().then(on: q, execute: body) - } - - /// - See: `Promise.always()` - public func always(on q: DispatchQueue = .default, execute body: @escaping () -> Void) -> Promise { - return asPromise().always(execute: body) - } - - /// - See: `Promise.tap()` - public func tap(on q: DispatchQueue = .default, execute body: @escaping (Result) -> Void) -> Promise { - return asPromise().tap(execute: body) - } - - /// - See: `Promise.recover()` - public func recover(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) throws -> Promise) -> Promise { - return asPromise().recover(on: q, policy: policy, execute: body) - } - - /// - See: `Promise.recover()` - public func recover(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) throws -> Any?) -> Promise { - return asPromise().recover(on: q, policy: policy, execute: body) - } - - /// - See: `Promise.catch()` - public func `catch`(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) -> Void) { - state.catch(on: q, policy: policy, else: { _ in }, execute: body) - } - -// MARK: ObjC methods - - /** - A promise starts pending and eventually resolves. - - Returns: `true` if the promise has not yet resolved. - */ - @objc public var pending: Bool { - return state.get() == nil - } - - /** - A promise starts pending and eventually resolves. - - Returns: `true` if the promise has resolved. - */ - @objc public var resolved: Bool { - return !pending - } - - /** - The value of the asynchronous task this promise represents. - - A promise has `nil` value if the asynchronous task it represents has not finished. If the value is `nil` the promise is still `pending`. - - - Warning: *Note* Our Swift variant’s value property returns nil if the promise is rejected where AnyPromise will return the error object. This fits with the pattern where AnyPromise is not strictly typed and is more dynamic, but you should be aware of the distinction. - - - Note: If the AnyPromise was fulfilled with a `PMKManifold`, returns only the first fulfillment object. - - - Returns: The value with which this promise was resolved or `nil` if this promise is pending. - */ - @objc private var __value: Any? { - switch state.get() { - case nil: - return nil - case .rejected(let error, _)?: - return error - case .fulfilled(let obj)?: - return obj - } - } - - /** - Creates a resolved promise. - - When developing your own promise systems, it is occasionally useful to be able to return an already resolved promise. - - - Parameter value: The value with which to resolve this promise. Passing an `NSError` will cause the promise to be rejected, passing an AnyPromise will return a new AnyPromise bound to that promise, otherwise the promise will be fulfilled with the value passed. - - - Returns: A resolved promise. - */ - @objc public class func promiseWithValue(_ value: Any?) -> AnyPromise { - let state: State - switch value { - case let promise as AnyPromise: - state = promise.state - case let err as Error: - state = SealedState(resolution: Resolution(err)) - default: - state = SealedState(resolution: .fulfilled(value)) - } - return AnyPromise(state: state) - } - - private init(state: State) { - self.state = state - } - - /** - Create a new promise that resolves with the provided block. - - Use this method when wrapping asynchronous code that does *not* use promises so that this code can be used in promise chains. - - If `resolve` is called with an `NSError` object, the promise is rejected, otherwise the promise is fulfilled. - - Don’t use this method if you already have promises! Instead, just return your promise. - - Should you need to fulfill a promise but have no sensical value to use: your promise is a `void` promise: fulfill with `nil`. - - The block you pass is executed immediately on the calling thread. - - - Parameter block: The provided block is immediately executed, inside the block call `resolve` to resolve this promise and cause any attached handlers to execute. If you are wrapping a delegate-based system, we recommend instead to use: initWithResolver: - - - Returns: A new promise. - - Warning: Resolving a promise with `nil` fulfills it. - - SeeAlso: http://promisekit.org/sealing-your-own-promises/ - - SeeAlso: http://promisekit.org/wrapping-delegation/ - */ - @objc public class func promiseWithResolverBlock(_ body: (@escaping (Any?) -> Void) -> Void) -> AnyPromise { - return AnyPromise(sealant: { resolve in - body { obj in - makeHandler({ _ in obj }, resolve)(obj) - } - }) - } - - private init(sealant: (@escaping (Resolution) -> Void) -> Void) { - var resolve: ((Resolution) -> Void)! - state = UnsealedState(resolver: &resolve) - sealant(resolve) - } - - @objc func __thenOn(_ q: DispatchQueue, execute body: @escaping (Any?) -> Any?) -> AnyPromise { - return AnyPromise(sealant: { resolve in - state.then(on: q, else: resolve, execute: makeHandler(body, resolve)) - }) - } - - @objc func __catchOn(_ q: DispatchQueue, withPolicy policy: CatchPolicy, execute body: @escaping (Any?) -> Any?) -> AnyPromise { - return AnyPromise(sealant: { resolve in - state.catch(on: q, policy: policy, else: resolve) { err in - makeHandler(body, resolve)(err as NSError) - } - }) - } - - @objc func __alwaysOn(_ q: DispatchQueue, execute body: @escaping () -> Void) -> AnyPromise { - return AnyPromise(sealant: { resolve in - state.always(on: q) { resolution in - body() - resolve(resolution) - } - }) - } - - /** - Convert an `AnyPromise` to `Promise`. - - anyPromise.toPromise(T).then { (t: T) -> U in ... } - - - Returns: A `Promise` with the requested type. - - Throws: `CastingError.CastingAnyPromiseFailed(T)` if self's value cannot be downcasted to the given type. - */ - public func asPromise(type: T.Type) -> Promise { - return self.then(on: zalgo) { (value: Any?) -> T in - if let value = value as? T { - return value - } - throw PMKError.castError(type) - } - } - - /// used by PMKWhen and PMKJoin - @objc func __pipe(_ body: @escaping (Any?) -> Void) { - state.pipe { resolution in - switch resolution { - case .rejected(let error, let token): - token.consumed = true // when and join will create a new parent error that is unconsumed - body(error as NSError) - case .fulfilled(let value): - body(value) - } - } - } -} - -extension AnyPromise { - /** - - Returns: A description of the state of this promise. - */ - override public var description: String { - return "AnyPromise: \(state)" - } -} - -private func makeHandler(_ body: @escaping (Any?) -> Any?, _ resolve: @escaping (Resolution) -> Void) -> (Any?) -> Void { - return { obj in - let obj = body(obj) - switch obj { - case let err as Error: - resolve(Resolution(err)) - case let promise as AnyPromise: - promise.state.pipe(resolve) - default: - resolve(.fulfilled(obj)) - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift deleted file mode 100644 index 2c912129e2b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/DispatchQueue+Promise.swift +++ /dev/null @@ -1,53 +0,0 @@ -import Dispatch - -extension DispatchQueue { - /** - Submits a block for asynchronous execution on a dispatch queue. - - DispatchQueue.global().promise { - try md5(input) - }.then { md5 in - //… - } - - - Parameter body: The closure that resolves this promise. - - Returns: A new promise resolved by the result of the provided closure. - - - SeeAlso: `DispatchQueue.async(group:qos:flags:execute:)` - - SeeAlso: `dispatch_promise()` - - SeeAlso: `dispatch_promise_on()` - */ - public final func promise(group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () throws -> T) -> Promise { - - return Promise(sealant: { resolve in - async(group: group, qos: qos, flags: flags) { - do { - resolve(.fulfilled(try body())) - } catch { - resolve(Resolution(error)) - } - } - }) - } - - /// Unavailable due to Swift compiler issues - @available(*, unavailable) - public final func promise(group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: () throws -> Promise) -> Promise { fatalError() } - - /** - The default queue for all handlers. - - Defaults to `DispatchQueue.main`. - - - SeeAlso: `PMKDefaultDispatchQueue()` - - SeeAlso: `PMKSetDefaultDispatchQueue()` - */ - class public final var `default`: DispatchQueue { - get { - return __PMKDefaultDispatchQueue() - } - set { - __PMKSetDefaultDispatchQueue(newValue) - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift deleted file mode 100644 index 0c746ce45af..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift +++ /dev/null @@ -1,169 +0,0 @@ -import Foundation - -public enum PMKError: Error { - /** - The ErrorType for a rejected `join`. - - Parameter 0: The promises passed to this `join` that did not *all* fulfill. - - Note: The array is untyped because Swift generics are fussy with enums. - */ - case join([AnyObject]) - - /** - The completionHandler with form (T?, ErrorType?) was called with (nil, nil) - This is invalid as per Cocoa/Apple calling conventions. - */ - case invalidCallingConvention - - /** - A handler returned its own promise. 99% of the time, this is likely a - programming error. It is also invalid per Promises/A+. - */ - case returnedSelf - - /** `when()` was called with a concurrency of <= 0 */ - case whenConcurrentlyZero - - /** AnyPromise.toPromise failed to cast as requested */ - case castError(Any.Type) -} - -public enum PMKURLError: Error { - /** - The URLRequest succeeded but a valid UIImage could not be decoded from - the data that was received. - */ - case invalidImageData(URLRequest, Data) - - /** - The HTTP request returned a non-200 status code. - */ - case badResponse(URLRequest, Data?, URLResponse?) - - /** - The data could not be decoded using the encoding specified by the HTTP - response headers. - */ - case stringEncoding(URLRequest, Data, URLResponse) - - /** - Usually the `URLResponse` is actually an `HTTPURLResponse`, if so you - can access it using this property. Since it is returned as an unwrapped - optional: be sure. - */ - public var NSHTTPURLResponse: Foundation.HTTPURLResponse! { - switch self { - case .invalidImageData: - return nil - case .badResponse(_, _, let rsp): - return rsp as! Foundation.HTTPURLResponse - case .stringEncoding(_, _, let rsp): - return rsp as! Foundation.HTTPURLResponse - } - } -} - -extension PMKURLError: CustomStringConvertible { - public var description: String { - switch self { - case let .badResponse(rq, data, rsp): - if let data = data, let str = String(data: data, encoding: .utf8), let rsp = rsp { - return "PromiseKit: badResponse: \(rq): \(rsp)\n\(str)" - } else { - fallthrough - } - default: - return "\(self)" - } - } -} - -public enum JSONError: Error { - /// The JSON response was different to that requested - case unexpectedRootNode(Any) -} - -//////////////////////////////////////////////////////////// Cancellation - -public protocol CancellableError: Error { - var isCancelled: Bool { get } -} - -#if !SWIFT_PACKAGE - -private struct ErrorPair: Hashable { - let domain: String - let code: Int - init(_ d: String, _ c: Int) { - domain = d; code = c - } - var hashValue: Int { - return "\(domain):\(code)".hashValue - } -} - -private func ==(lhs: ErrorPair, rhs: ErrorPair) -> Bool { - return lhs.domain == rhs.domain && lhs.code == rhs.code -} - -extension NSError { - @objc public class func cancelledError() -> NSError { - let info = [NSLocalizedDescriptionKey: "The operation was cancelled"] - return NSError(domain: PMKErrorDomain, code: PMKOperationCancelled, userInfo: info) - } - - /** - - Warning: You must call this method before any promises in your application are rejected. Failure to ensure this may lead to concurrency crashes. - - Warning: You must call this method on the main thread. Failure to do this may lead to concurrency crashes. - */ - @objc public class func registerCancelledErrorDomain(_ domain: String, code: Int) { - cancelledErrorIdentifiers.insert(ErrorPair(domain, code)) - } - - /// - Returns: true if the error represents cancellation. - @objc public var isCancelled: Bool { - return (self as Error).isCancelledError - } -} - -private var cancelledErrorIdentifiers = Set([ - ErrorPair(PMKErrorDomain, PMKOperationCancelled), - ErrorPair(NSCocoaErrorDomain, NSUserCancelledError), - ErrorPair(NSURLErrorDomain, NSURLErrorCancelled) -]) - -#endif - -extension Error { - public var isCancelledError: Bool { - if let ce = self as? CancellableError { - return ce.isCancelled - } else { - #if SWIFT_PACKAGE - return false - #else - let ne = self as NSError - return cancelledErrorIdentifiers.contains(ErrorPair(ne.domain, ne.code)) - #endif - } - } -} - -//////////////////////////////////////////////////////// Unhandled Errors -class ErrorConsumptionToken { - var consumed = false - let error: Error - - init(_ error: Error) { - self.error = error - } - - deinit { - if !consumed { -#if os(Linux) || os(Android) - PMKUnhandledErrorHandler(error) -#else - PMKUnhandledErrorHandler(error as NSError) -#endif - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m deleted file mode 100644 index c156cde9480..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/GlobalState.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "PromiseKit.h" - -@interface NSError (PMK) -- (BOOL)isCancelled; -@end - -static dispatch_once_t __PMKDefaultDispatchQueueToken; -static dispatch_queue_t __PMKDefaultDispatchQueue; - -dispatch_queue_t PMKDefaultDispatchQueue() { - dispatch_once(&__PMKDefaultDispatchQueueToken, ^{ - if (__PMKDefaultDispatchQueue == nil) { - __PMKDefaultDispatchQueue = dispatch_get_main_queue(); - } - }); - return __PMKDefaultDispatchQueue; -} - -void PMKSetDefaultDispatchQueue(dispatch_queue_t newDefaultQueue) { - dispatch_once(&__PMKDefaultDispatchQueueToken, ^{ - __PMKDefaultDispatchQueue = newDefaultQueue; - }); -} - - -static dispatch_once_t __PMKErrorUnhandlerToken; -static void (^__PMKErrorUnhandler)(NSError *); - -void PMKUnhandledErrorHandler(NSError *error) { - dispatch_once(&__PMKErrorUnhandlerToken, ^{ - if (__PMKErrorUnhandler == nil) { - __PMKErrorUnhandler = ^(NSError *error){ - if (!error.isCancelled) { - NSLog(@"PromiseKit: unhandled error: %@", error); - } - }; - } - }); - return __PMKErrorUnhandler(error); -} - -void PMKSetUnhandledErrorHandler(void(^newHandler)(NSError *)) { - dispatch_once(&__PMKErrorUnhandlerToken, ^{ - __PMKErrorUnhandler = newHandler; - }); -} - - -static dispatch_once_t __PMKUnhandledExceptionHandlerToken; -static NSError *(^__PMKUnhandledExceptionHandler)(id); - -NSError *PMKProcessUnhandledException(id thrown) { - - dispatch_once(&__PMKUnhandledExceptionHandlerToken, ^{ - __PMKUnhandledExceptionHandler = ^id(id reason){ - if ([reason isKindOfClass:[NSError class]]) - return reason; - if ([reason isKindOfClass:[NSString class]]) - return [NSError errorWithDomain:PMKErrorDomain code:PMKUnexpectedError userInfo:@{NSLocalizedDescriptionKey: reason}]; - return nil; - }; - }); - - id err = __PMKUnhandledExceptionHandler(thrown); - if (!err) { - NSLog(@"PromiseKit no longer catches *all* exceptions. However you can change this behavior by setting a new PMKProcessUnhandledException handler."); - @throw thrown; - } - return err; -} - -void PMKSetUnhandledExceptionHandler(NSError *(^newHandler)(id)) { - dispatch_once(&__PMKUnhandledExceptionHandlerToken, ^{ - __PMKUnhandledExceptionHandler = newHandler; - }); -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m deleted file mode 100644 index 700c1b37ef7..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m +++ /dev/null @@ -1,77 +0,0 @@ -#import - -struct PMKBlockLiteral { - void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock - int flags; - int reserved; - void (*invoke)(void *, ...); - struct block_descriptor { - unsigned long int reserved; // NULL - unsigned long int size; // sizeof(struct Block_literal_1) - // optional helper functions - void (*copy_helper)(void *dst, void *src); // IFF (1<<25) - void (*dispose_helper)(void *src); // IFF (1<<25) - // required ABI.2010.3.16 - const char *signature; // IFF (1<<30) - } *descriptor; - // imported variables -}; - -typedef NS_OPTIONS(NSUInteger, PMKBlockDescriptionFlags) { - PMKBlockDescriptionFlagsHasCopyDispose = (1 << 25), - PMKBlockDescriptionFlagsHasCtor = (1 << 26), // helpers have C++ code - PMKBlockDescriptionFlagsIsGlobal = (1 << 28), - PMKBlockDescriptionFlagsHasStret = (1 << 29), // IFF BLOCK_HAS_SIGNATURE - PMKBlockDescriptionFlagsHasSignature = (1 << 30) -}; - -// It appears 10.7 doesn't support quotes in method signatures. Remove them -// via @rabovik's method. See https://github.com/OliverLetterer/SLObjectiveCRuntimeAdditions/pull/2 -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 -NS_INLINE static const char * pmk_removeQuotesFromMethodSignature(const char *str){ - char *result = malloc(strlen(str) + 1); - BOOL skip = NO; - char *to = result; - char c; - while ((c = *str++)) { - if ('"' == c) { - skip = !skip; - continue; - } - if (skip) continue; - *to++ = c; - } - *to = '\0'; - return result; -} -#endif - -static NSMethodSignature *NSMethodSignatureForBlock(id block) { - if (!block) - return nil; - - struct PMKBlockLiteral *blockRef = (__bridge struct PMKBlockLiteral *)block; - PMKBlockDescriptionFlags flags = (PMKBlockDescriptionFlags)blockRef->flags; - - if (flags & PMKBlockDescriptionFlagsHasSignature) { - void *signatureLocation = blockRef->descriptor; - signatureLocation += sizeof(unsigned long int); - signatureLocation += sizeof(unsigned long int); - - if (flags & PMKBlockDescriptionFlagsHasCopyDispose) { - signatureLocation += sizeof(void(*)(void *dst, void *src)); - signatureLocation += sizeof(void (*)(void *src)); - } - - const char *signature = (*(const char **)signatureLocation); -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 - signature = pmk_removeQuotesFromMethodSignature(signature); - NSMethodSignature *nsSignature = [NSMethodSignature signatureWithObjCTypes:signature]; - free((void *)signature); - - return nsSignature; -#endif - return [NSMethodSignature signatureWithObjCTypes:signature]; - } - return 0; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m deleted file mode 100644 index f89197ec04e..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m +++ /dev/null @@ -1,114 +0,0 @@ -#import "NSMethodSignatureForBlock.m" -#import -#import -#import "AnyPromise+Private.h" -#import -#import -#import - -#ifndef PMKLog -#define PMKLog NSLog -#endif - -@interface PMKArray : NSObject { -@public - id objs[3]; - NSUInteger count; -} @end - -@implementation PMKArray - -- (id)objectAtIndexedSubscript:(NSUInteger)idx { - if (count <= idx) { - // this check is necessary due to lack of checks in `pmk_safely_call_block` - return nil; - } - return objs[idx]; -} - -@end - -id __PMKArrayWithCount(NSUInteger count, ...) { - PMKArray *this = [PMKArray new]; - this->count = count; - va_list args; - va_start(args, count); - for (NSUInteger x = 0; x < count; ++x) - this->objs[x] = va_arg(args, id); - va_end(args); - return this; -} - - -static inline id _PMKCallVariadicBlock(id frock, id result) { - NSCAssert(frock, @""); - - NSMethodSignature *sig = NSMethodSignatureForBlock(frock); - const NSUInteger nargs = sig.numberOfArguments; - const char rtype = sig.methodReturnType[0]; - - #define call_block_with_rtype(type) ({^type{ \ - switch (nargs) { \ - case 1: \ - return ((type(^)(void))frock)(); \ - case 2: { \ - const id arg = [result class] == [PMKArray class] ? result[0] : result; \ - return ((type(^)(id))frock)(arg); \ - } \ - case 3: { \ - type (^block)(id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1]) \ - : block(result, nil); \ - } \ - case 4: { \ - type (^block)(id, id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1], result[2]) \ - : block(result, nil, nil); \ - } \ - default: \ - @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"PromiseKit: The provided block’s argument count is unsupported." userInfo:nil]; \ - }}();}) - - switch (rtype) { - case 'v': - call_block_with_rtype(void); - return nil; - case '@': - return call_block_with_rtype(id) ?: nil; - case '*': { - char *str = call_block_with_rtype(char *); - return str ? @(str) : nil; - } - case 'c': return @(call_block_with_rtype(char)); - case 'i': return @(call_block_with_rtype(int)); - case 's': return @(call_block_with_rtype(short)); - case 'l': return @(call_block_with_rtype(long)); - case 'q': return @(call_block_with_rtype(long long)); - case 'C': return @(call_block_with_rtype(unsigned char)); - case 'I': return @(call_block_with_rtype(unsigned int)); - case 'S': return @(call_block_with_rtype(unsigned short)); - case 'L': return @(call_block_with_rtype(unsigned long)); - case 'Q': return @(call_block_with_rtype(unsigned long long)); - case 'f': return @(call_block_with_rtype(float)); - case 'd': return @(call_block_with_rtype(double)); - case 'B': return @(call_block_with_rtype(_Bool)); - case '^': - if (strcmp(sig.methodReturnType, "^v") == 0) { - call_block_with_rtype(void); - return nil; - } - // else fall through! - default: - @throw [NSException exceptionWithName:@"PromiseKit" reason:@"PromiseKit: Unsupported method signature." userInfo:nil]; - } -} - -static id PMKCallVariadicBlock(id frock, id result) { - @try { - return _PMKCallVariadicBlock(frock, result); - } @catch (id thrown) { - return PMKProcessUnhandledException(thrown); - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift deleted file mode 100644 index 5d77d4c8332..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+AnyPromise.swift +++ /dev/null @@ -1,41 +0,0 @@ -import class Dispatch.DispatchQueue - -extension Promise { - /** - The provided closure executes once this promise resolves. - - - Parameter on: The queue on which the provided closure executes. - - Parameter body: The closure that is executed when this promise fulfills. - - Returns: A new promise that resolves when the `AnyPromise` returned from the provided closure resolves. For example: - - URLSession.GET(url).then { (data: NSData) -> AnyPromise in - //… - return SCNetworkReachability() - }.then { _ in - //… - } - */ - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> AnyPromise) -> Promise { - return Promise(sealant: { resolve in - state.then(on: q, else: resolve) { value in - try body(value).state.pipe(resolve) - } - }) - } - - @available(*, unavailable, message: "unwrap the promise") - public func then(on: DispatchQueue = .default, execute body: (T) throws -> AnyPromise?) -> Promise { fatalError() } -} - -/** - `firstly` can make chains more readable. -*/ -public func firstly(execute body: () throws -> AnyPromise) -> Promise { - return Promise(sealant: { resolve in - do { - try body().state.pipe(resolve) - } catch { - resolve(Resolution(error)) - } - }) -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift deleted file mode 100644 index 251ea6dcb4b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift +++ /dev/null @@ -1,57 +0,0 @@ -extension Promise { - /** - - Returns: The error with which this promise was rejected; `nil` if this promise is not rejected. - */ - public var error: Error? { - switch state.get() { - case .none: - return nil - case .some(.fulfilled): - return nil - case .some(.rejected(let error, _)): - return error - } - } - - /** - - Returns: `true` if the promise has not yet resolved. - */ - public var isPending: Bool { - return state.get() == nil - } - - /** - - Returns: `true` if the promise has resolved. - */ - public var isResolved: Bool { - return !isPending - } - - /** - - Returns: `true` if the promise was fulfilled. - */ - public var isFulfilled: Bool { - return value != nil - } - - /** - - Returns: `true` if the promise was rejected. - */ - public var isRejected: Bool { - return error != nil - } - - /** - - Returns: The value with which this promise was fulfilled or `nil` if this promise is pending or rejected. - */ - public var value: T? { - switch state.get() { - case .none: - return nil - case .some(.fulfilled(let value)): - return value - case .some(.rejected): - return nil - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift deleted file mode 100644 index 39cfd4ad291..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift +++ /dev/null @@ -1,633 +0,0 @@ -import class Dispatch.DispatchQueue -import class Foundation.NSError -import func Foundation.NSLog - -/** - A *promise* represents the future value of a (usually) asynchronous task. - - To obtain the value of a promise we call `then`. - - Promises are chainable: `then` returns a promise, you can call `then` on - that promise, which returns a promise, you can call `then` on that - promise, et cetera. - - Promises start in a pending state and *resolve* with a value to become - *fulfilled* or an `Error` to become rejected. - - - SeeAlso: [PromiseKit `then` Guide](http://promisekit.org/docs/) - */ -open class Promise { - let state: State - - /** - Create a new, pending promise. - - func fetchAvatar(user: String) -> Promise { - return Promise { fulfill, reject in - MyWebHelper.GET("\(user)/avatar") { data, err in - guard let data = data else { return reject(err) } - guard let img = UIImage(data: data) else { return reject(MyError.InvalidImage) } - guard let img.size.width > 0 else { return reject(MyError.ImageTooSmall) } - fulfill(img) - } - } - } - - - Parameter resolvers: The provided closure is called immediately on the active thread; commence your asynchronous task, calling either fulfill or reject when it completes. - - Parameter fulfill: Fulfills this promise with the provided value. - - Parameter reject: Rejects this promise with the provided error. - - - Returns: A new promise. - - - Note: If you are wrapping a delegate-based system, we recommend - to use instead: `Promise.pending()` - - - SeeAlso: http://promisekit.org/docs/sealing-promises/ - - SeeAlso: http://promisekit.org/docs/cookbook/wrapping-delegation/ - - SeeAlso: pending() - */ - required public init(resolvers: (_ fulfill: @escaping (T) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) { - var resolve: ((Resolution) -> Void)! - do { - state = UnsealedState(resolver: &resolve) - try resolvers({ resolve(.fulfilled($0)) }, { error in - #if !PMKDisableWarnings - if self.isPending { - resolve(Resolution(error)) - } else { - NSLog("PromiseKit: warning: reject called on already rejected Promise: \(error)") - } - #else - resolve(Resolution(error)) - #endif - }) - } catch { - resolve(Resolution(error)) - } - } - - /** - Create an already fulfilled promise. - - To create a resolved `Void` promise, do: `Promise(value: ())` - */ - required public init(value: T) { - state = SealedState(resolution: .fulfilled(value)) - } - - /** - Create an already rejected promise. - */ - required public init(error: Error) { - state = SealedState(resolution: Resolution(error)) - } - - /** - Careful with this, it is imperative that sealant can only be called once - or you will end up with spurious unhandled-errors due to possible double - rejections and thus immediately deallocated ErrorConsumptionTokens. - */ - init(sealant: (@escaping (Resolution) -> Void) -> Void) { - var resolve: ((Resolution) -> Void)! - state = UnsealedState(resolver: &resolve) - sealant(resolve) - } - - /** - A `typealias` for the return values of `pending()`. Simplifies declaration of properties that reference the values' containing tuple when this is necessary. For example, when working with multiple `pendingPromise(value: ())`s within the same scope, or when the promise initialization must occur outside of the caller's initialization. - - class Foo: BarDelegate { - var task: Promise.PendingTuple? - } - - - SeeAlso: pending() - */ - public typealias PendingTuple = (promise: Promise, fulfill: (T) -> Void, reject: (Error) -> Void) - - /** - Making promises that wrap asynchronous delegation systems or other larger asynchronous systems without a simple completion handler is easier with pending. - - class Foo: BarDelegate { - let (promise, fulfill, reject) = Promise.pending() - - func barDidFinishWithResult(result: Int) { - fulfill(result) - } - - func barDidError(error: NSError) { - reject(error) - } - } - - - Returns: A tuple consisting of: - 1) A promise - 2) A function that fulfills that promise - 3) A function that rejects that promise - */ - public final class func pending() -> PendingTuple { - var fulfill: ((T) -> Void)! - var reject: ((Error) -> Void)! - let promise = self.init { fulfill = $0; reject = $1 } - return (promise, fulfill, reject) - } - - /** - The provided closure is executed when this promise is resolved. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that is executed when this Promise is fulfilled. - - Returns: A new promise that is resolved with the value returned from the provided closure. For example: - - URLSession.GET(url).then { data -> Int in - //… - return data.length - }.then { length in - //… - } - */ - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> U) -> Promise { - return Promise { resolve in - state.then(on: q, else: resolve) { value in - resolve(.fulfilled(try body(value))) - } - } - } - - /** - The provided closure executes when this promise resolves. - - This variant of `then` allows chaining promises, the promise returned by the provided closure is resolved before the promise returned by this closure resolves. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter execute: The closure that executes when this promise fulfills. - - Returns: A new promise that resolves when the promise returned from the provided closure resolves. For example: - - URLSession.GET(url1).then { data in - return CLLocationManager.promise() - }.then { location in - //… - } - */ - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> Promise) -> Promise { - var resolve: ((Resolution) -> Void)! - let rv = Promise { resolve = $0 } - state.then(on: q, else: resolve) { value in - let promise = try body(value) - guard promise !== rv else { throw PMKError.returnedSelf } - promise.state.pipe(resolve) - } - return rv - } - - /** - The provided closure executes when this promise resolves. - - This variant of `then` allows returning a tuple of promises within provided closure. All of the returned - promises needs be fulfilled for this promise to be marked as resolved. - - - Note: At maximum 5 promises may be returned in a tuple - - Note: If *any* of the tuple-provided promises reject, the returned promise is immediately rejected with that error. - - Warning: In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. - - Parameter on: The queue to which the provided closure dispatches. - - Parameter execute: The closure that executes when this promise fulfills. - - Returns: A new promise that resolves when all promises returned from the provided closure resolve. For example: - - loginPromise.then { _ -> (Promise, Promise) - return (URLSession.GET(userUrl), URLSession.dataTask(with: avatarUrl).asImage()) - }.then { userData, avatarImage in - //… - } - */ - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> (Promise, Promise)) -> Promise<(U, V)> { - return then(on: q, execute: body) { when(fulfilled: $0.0, $0.1) } - } - - /// This variant of `then` allows returning a tuple of promises within provided closure. - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> (Promise, Promise, Promise)) -> Promise<(U, V, X)> { - return then(on: q, execute: body) { when(fulfilled: $0.0, $0.1, $0.2) } - } - - /// This variant of `then` allows returning a tuple of promises within provided closure. - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> (Promise, Promise, Promise, Promise)) -> Promise<(U, V, X, Y)> { - return then(on: q, execute: body) { when(fulfilled: $0.0, $0.1, $0.2, $0.3) } - } - - /// This variant of `then` allows returning a tuple of promises within provided closure. - public func then(on q: DispatchQueue = .default, execute body: @escaping (T) throws -> (Promise, Promise, Promise, Promise, Promise)) -> Promise<(U, V, X, Y, Z)> { - return then(on: q, execute: body) { when(fulfilled: $0.0, $0.1, $0.2, $0.3, $0.4) } - } - - /// utility function to serve `then` implementations with `body` returning tuple of promises - private func then(on q: DispatchQueue, execute body: @escaping (T) throws -> V, when: @escaping (V) -> Promise) -> Promise { - return Promise { resolve in - state.then(on: q, else: resolve) { value in - let promise = try body(value) - - // since when(promise) switches to `zalgo`, we have to pipe back to `q` - when(promise).state.pipe(on: q, to: resolve) - } - } - } - - /** - The provided closure executes when this promise rejects. - - Rejecting a promise cascades: rejecting all subsequent promises (unless - recover is invoked) thus you will typically place your catch at the end - of a chain. Often utility promises will not have a catch, instead - delegating the error handling to the caller. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter policy: The default policy does not execute your handler for cancellation errors. - - Parameter execute: The handler to execute if this promise is rejected. - - Returns: `self` - - SeeAlso: [Cancellation](http://promisekit.org/docs/) - - Important: The promise that is returned is `self`. `catch` cannot affect the chain, in PromiseKit 3 no promise was returned to strongly imply this, however for PromiseKit 4 we started returning a promise so that you can `always` after a catch or return from a function that has an error handler. - */ - @discardableResult - public func `catch`(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) -> Void) -> Promise { - state.catch(on: q, policy: policy, else: { _ in }, execute: body) - return self - } - - /** - The provided closure executes when this promise rejects. - - Unlike `catch`, `recover` continues the chain provided the closure does not throw. Use `recover` in circumstances where recovering the chain from certain errors is a possibility. For example: - - CLLocationManager.promise().recover { error in - guard error == CLError.unknownLocation else { throw error } - return CLLocation.Chicago - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter policy: The default policy does not execute your handler for cancellation errors. - - Parameter execute: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](http://promisekit.org/docs/) - */ - public func recover(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) throws -> Promise) -> Promise { - var resolve: ((Resolution) -> Void)! - let rv = Promise { resolve = $0 } - state.catch(on: q, policy: policy, else: resolve) { error in - let promise = try body(error) - guard promise !== rv else { throw PMKError.returnedSelf } - promise.state.pipe(resolve) - } - return rv - } - - /** - The provided closure executes when this promise rejects. - - Unlike `catch`, `recover` continues the chain provided the closure does not throw. Use `recover` in circumstances where recovering the chain from certain errors is a possibility. For example: - - CLLocationManager.promise().recover { error in - guard error == CLError.unknownLocation else { throw error } - return CLLocation.Chicago - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter policy: The default policy does not execute your handler for cancellation errors. - - Parameter execute: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](http://promisekit.org/docs/) - */ - public func recover(on q: DispatchQueue = .default, policy: CatchPolicy = .allErrorsExceptCancellation, execute body: @escaping (Error) throws -> T) -> Promise { - return Promise { resolve in - state.catch(on: q, policy: policy, else: resolve) { error in - resolve(.fulfilled(try body(error))) - } - } - } - - /** - The provided closure executes when this promise resolves. - - firstly { - UIApplication.shared.networkActivityIndicatorVisible = true - }.then { - //… - }.always { - UIApplication.shared.networkActivityIndicatorVisible = false - }.catch { - //… - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter execute: The closure that executes when this promise resolves. - - Returns: A new promise, resolved with this promise’s resolution. - */ - @discardableResult - public func always(on q: DispatchQueue = .default, execute body: @escaping () -> Void) -> Promise { - state.always(on: q) { _ in - body() - } - return self - } - - /** - Allows you to “tap” into a promise chain and inspect its result. - - The function you provide cannot mutate the chain. - - URLSession.GET(/*…*/).tap { result in - print(result) - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter execute: The closure that executes when this promise resolves. - - Returns: A new promise, resolved with this promise’s resolution. - */ - @discardableResult - public func tap(on q: DispatchQueue = .default, execute body: @escaping (Result) -> Void) -> Promise { - state.always(on: q) { resolution in - body(Result(resolution)) - } - return self - } - - /** - Void promises are less prone to generics-of-doom scenarios. - - SeeAlso: when.swift contains enlightening examples of using `Promise` to simplify your code. - */ - public func asVoid() -> Promise { - return then(on: zalgo) { _ in return } - } - -// MARK: deprecations - - @available(*, unavailable, renamed: "always()") - public func finally(on: DispatchQueue = DispatchQueue.main, execute body: () -> Void) -> Promise { fatalError() } - - @available(*, unavailable, renamed: "always()") - public func ensure(on: DispatchQueue = DispatchQueue.main, execute body: () -> Void) -> Promise { fatalError() } - - @available(*, unavailable, renamed: "pending()") - public class func `defer`() -> PendingTuple { fatalError() } - - @available(*, unavailable, renamed: "pending()") - public class func `pendingPromise`() -> PendingTuple { fatalError() } - - @available(*, unavailable, message: "deprecated: use then(on: .global())") - public func thenInBackground(execute body: (T) throws -> U) -> Promise { fatalError() } - - @available(*, unavailable, renamed: "catch") - public func onError(policy: CatchPolicy = .allErrors, execute body: (Error) -> Void) { fatalError() } - - @available(*, unavailable, renamed: "catch") - public func errorOnQueue(_ on: DispatchQueue, policy: CatchPolicy = .allErrors, execute body: (Error) -> Void) { fatalError() } - - @available(*, unavailable, renamed: "catch") - public func error(policy: CatchPolicy, execute body: (Error) -> Void) { fatalError() } - - @available(*, unavailable, renamed: "catch") - public func report(policy: CatchPolicy = .allErrors, execute body: (Error) -> Void) { fatalError() } - - @available(*, unavailable, renamed: "init(value:)") - public init(_ value: T) { fatalError() } - -// MARK: disallow `Promise` - - @available(*, unavailable, message: "cannot instantiate Promise") - public init(resolvers: (_ fulfill: (T) -> Void, _ reject: (Error) -> Void) throws -> Void) { fatalError() } - - @available(*, unavailable, message: "cannot instantiate Promise") - public class func pending() -> (promise: Promise, fulfill: (T) -> Void, reject: (Error) -> Void) { fatalError() } - -// MARK: disallow returning `Error` - - @available (*, unavailable, message: "instead of returning the error; throw") - public func then(on: DispatchQueue = .default, execute body: (T) throws -> U) -> Promise { fatalError() } - - @available (*, unavailable, message: "instead of returning the error; throw") - public func recover(on: DispatchQueue = .default, execute body: (Error) throws -> T) -> Promise { fatalError() } - -// MARK: disallow returning `Promise?` - - @available(*, unavailable, message: "unwrap the promise") - public func then(on: DispatchQueue = .default, execute body: (T) throws -> Promise?) -> Promise { fatalError() } - - @available(*, unavailable, message: "unwrap the promise") - public func recover(on: DispatchQueue = .default, execute body: (Error) throws -> Promise?) -> Promise { fatalError() } -} - -extension Promise: CustomStringConvertible { - public var description: String { - return "Promise: \(state)" - } -} - -/** - Judicious use of `firstly` *may* make chains more readable. - - Compare: - - URLSession.GET(url1).then { - URLSession.GET(url2) - }.then { - URLSession.GET(url3) - } - - With: - - firstly { - URLSession.GET(url1) - }.then { - URLSession.GET(url2) - }.then { - URLSession.GET(url3) - } - */ -public func firstly(execute body: () throws -> Promise) -> Promise { - return firstly(execute: body) { $0 } -} - -/** - Judicious use of `firstly` *may* make chains more readable. - Firstly allows to return tuple of promises - - Compare: - - when(fulfilled: URLSession.GET(url1), URLSession.GET(url2)).then { - URLSession.GET(url3) - }.then { - URLSession.GET(url4) - } - - With: - - firstly { - (URLSession.GET(url1), URLSession.GET(url2)) - }.then { _, _ in - URLSession.GET(url2) - }.then { - URLSession.GET(url3) - } - - - Note: At maximum 5 promises may be returned in a tuple - - Note: If *any* of the tuple-provided promises reject, the returned promise is immediately rejected with that error. - */ -public func firstly(execute body: () throws -> (Promise, Promise)) -> Promise<(T, U)> { - return firstly(execute: body) { when(fulfilled: $0.0, $0.1) } -} - -/// Firstly allows to return tuple of promises -public func firstly(execute body: () throws -> (Promise, Promise, Promise)) -> Promise<(T, U, V)> { - return firstly(execute: body) { when(fulfilled: $0.0, $0.1, $0.2) } -} - -/// Firstly allows to return tuple of promises -public func firstly(execute body: () throws -> (Promise, Promise, Promise, Promise)) -> Promise<(T, U, V, W)> { - return firstly(execute: body) { when(fulfilled: $0.0, $0.1, $0.2, $0.3) } -} - -/// Firstly allows to return tuple of promises -public func firstly(execute body: () throws -> (Promise, Promise, Promise, Promise, Promise)) -> Promise<(T, U, V, W, X)> { - return firstly(execute: body) { when(fulfilled: $0.0, $0.1, $0.2, $0.3, $0.4) } -} - -/// utility function to serve `firstly` implementations with `body` returning tuple of promises -private func firstly(execute body: () throws -> V, when: (V) -> Promise) -> Promise { - do { - return when(try body()) - } catch { - return Promise(error: error) - } -} - -@available(*, unavailable, message: "instead of returning the error; throw") -public func firstly(execute body: () throws -> T) -> Promise { fatalError() } - -@available(*, unavailable, message: "use DispatchQueue.promise") -public func firstly(on: DispatchQueue, execute body: () throws -> Promise) -> Promise { fatalError() } - -/** - - SeeAlso: `DispatchQueue.promise(group:qos:flags:execute:)` - */ -@available(*, deprecated: 4.0, renamed: "DispatchQueue.promise") -public func dispatch_promise(_ on: DispatchQueue, _ body: @escaping () throws -> T) -> Promise { - return Promise(value: ()).then(on: on, execute: body) -} - -/** - The underlying resolved state of a promise. - - Remark: Same as `Resolution` but without the associated `ErrorConsumptionToken`. -*/ -public enum Result { - /// Fulfillment - case fulfilled(T) - /// Rejection - case rejected(Error) - - init(_ resolution: Resolution) { - switch resolution { - case .fulfilled(let value): - self = .fulfilled(value) - case .rejected(let error, _): - self = .rejected(error) - } - } - - /** - - Returns: `true` if the result is `fulfilled` or `false` if it is `rejected`. - */ - public var boolValue: Bool { - switch self { - case .fulfilled: - return true - case .rejected: - return false - } - } -} - -/** - An object produced by `Promise.joint()`, along with a promise to which it is bound. - - Joining with a promise via `Promise.join(_:)` will pipe the resolution of that promise to - the joint's bound promise. - - - SeeAlso: `Promise.joint()` - - SeeAlso: `Promise.join(_:)` - */ -public class PMKJoint { - fileprivate var resolve: ((Resolution) -> Void)! -} - -extension Promise { - /** - Provides a safe way to instantiate a `Promise` and resolve it later via its joint and another - promise. - - class Engine { - static func make() -> Promise { - let (enginePromise, joint) = Promise.joint() - let cylinder: Cylinder = Cylinder(explodeAction: { - - // We *could* use an IUO, but there are no guarantees about when - // this callback will be called. Having an actual promise is safe. - - enginePromise.then { engine in - engine.checkOilPressure() - } - }) - - firstly { - Ignition.default.start() - }.then { plugs in - Engine(cylinders: [cylinder], sparkPlugs: plugs) - }.join(joint) - - return enginePromise - } - } - - - Returns: A new promise and its joint. - - SeeAlso: `Promise.join(_:)` - */ - public final class func joint() -> (Promise, PMKJoint) { - let pipe = PMKJoint() - let promise = Promise(sealant: { pipe.resolve = $0 }) - return (promise, pipe) - } - - /** - Pipes the value of this promise to the promise created with the joint. - - - Parameter joint: The joint on which to join. - - SeeAlso: `Promise.joint()` - */ - public func join(_ joint: PMKJoint) { - state.pipe(joint.resolve) - } -} - -extension Promise where T: Collection { - /** - Transforms a `Promise` where `T` is a `Collection` into a `Promise<[U]>` - - URLSession.shared.dataTask(url: /*…*/).asArray().map { result in - return download(result) - }.then { images in - // images is `[UIImage]` - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter transform: The closure that executes when this promise resolves. - - Returns: A new promise, resolved with this promise’s resolution. - */ - public func map(on: DispatchQueue = .default, transform: @escaping (T.Iterator.Element) throws -> Promise) -> Promise<[U]> { - return Promise<[U]> { resolve in - return state.then(on: zalgo, else: resolve) { tt in - when(fulfilled: try tt.map(transform)).state.pipe(resolve) - } - } - } -} - -#if swift(>=3.1) -public extension Promise where T == Void { - convenience init() { - self.init(value: ()) - } -} -#endif diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h deleted file mode 100644 index 2651530cbc9..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "fwd.h" -#import "AnyPromise.h" - -#import // `FOUNDATION_EXPORT` - -FOUNDATION_EXPORT double PromiseKitVersionNumber; -FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift deleted file mode 100644 index 1a87b46af43..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift +++ /dev/null @@ -1,217 +0,0 @@ -import class Dispatch.DispatchQueue -import func Foundation.NSLog - -enum Seal { - case pending(Handlers) - case resolved(Resolution) -} - -enum Resolution { - case fulfilled(T) - case rejected(Error, ErrorConsumptionToken) - - init(_ error: Error) { - self = .rejected(error, ErrorConsumptionToken(error)) - } -} - -class State { - - // would be a protocol, but you can't have typed variables of “generic” - // protocols in Swift 2. That is, I couldn’t do var state: State when - // it was a protocol. There is no work around. Update: nor Swift 3 - - func get() -> Resolution? { fatalError("Abstract Base Class") } - func get(body: @escaping (Seal) -> Void) { fatalError("Abstract Base Class") } - - final func pipe(_ body: @escaping (Resolution) -> Void) { - get { seal in - switch seal { - case .pending(let handlers): - handlers.append(body) - case .resolved(let resolution): - body(resolution) - } - } - } - - final func pipe(on q: DispatchQueue, to body: @escaping (Resolution) -> Void) { - pipe { resolution in - contain_zalgo(q) { - body(resolution) - } - } - } - - final func then(on q: DispatchQueue, else rejecter: @escaping (Resolution) -> Void, execute body: @escaping (T) throws -> Void) { - pipe { resolution in - switch resolution { - case .fulfilled(let value): - contain_zalgo(q, rejecter: rejecter) { - try body(value) - } - case .rejected(let error, let token): - rejecter(.rejected(error, token)) - } - } - } - - final func always(on q: DispatchQueue, body: @escaping (Resolution) -> Void) { - pipe { resolution in - contain_zalgo(q) { - body(resolution) - } - } - } - - final func `catch`(on q: DispatchQueue, policy: CatchPolicy, else resolve: @escaping (Resolution) -> Void, execute body: @escaping (Error) throws -> Void) { - pipe { resolution in - switch (resolution, policy) { - case (.fulfilled, _): - resolve(resolution) - case (.rejected(let error, _), .allErrorsExceptCancellation) where error.isCancelledError: - resolve(resolution) - case (let .rejected(error, token), _): - contain_zalgo(q, rejecter: resolve) { - token.consumed = true - try body(error) - } - } - } - } -} - -class UnsealedState: State { - private let barrier = DispatchQueue(label: "org.promisekit.barrier", attributes: .concurrent) - private var seal: Seal - - /** - Quick return, but will not provide the handlers array because - it could be modified while you are using it by another thread. - If you need the handlers, use the second `get` variant. - */ - override func get() -> Resolution? { - var result: Resolution? - barrier.sync { - if case .resolved(let resolution) = self.seal { - result = resolution - } - } - return result - } - - override func get(body: @escaping (Seal) -> Void) { - var sealed = false - barrier.sync { - switch self.seal { - case .resolved: - sealed = true - case .pending: - sealed = false - } - } - if !sealed { - barrier.sync(flags: .barrier) { - switch (self.seal) { - case .pending: - body(self.seal) - case .resolved: - sealed = true // welcome to race conditions - } - } - } - if sealed { - body(seal) // as much as possible we do things OUTSIDE the barrier_sync - } - } - - required init(resolver: inout ((Resolution) -> Void)!) { - seal = .pending(Handlers()) - super.init() - resolver = { resolution in - var handlers: Handlers? - self.barrier.sync(flags: .barrier) { - if case .pending(let hh) = self.seal { - self.seal = .resolved(resolution) - handlers = hh - } - } - if let handlers = handlers { - for handler in handlers { - handler(resolution) - } - } - } - } -#if !PMKDisableWarnings - deinit { - if case .pending = seal { - NSLog("PromiseKit: Pending Promise deallocated! This is usually a bug") - } - } -#endif -} - -class SealedState: State { - fileprivate let resolution: Resolution - - init(resolution: Resolution) { - self.resolution = resolution - } - - override func get() -> Resolution? { - return resolution - } - - override func get(body: @escaping (Seal) -> Void) { - body(.resolved(resolution)) - } -} - -class Handlers: Sequence { - var bodies: [(Resolution) -> Void] = [] - - func append(_ body: @escaping (Resolution) -> Void) { - bodies.append(body) - } - - func makeIterator() -> IndexingIterator<[(Resolution) -> Void]> { - return bodies.makeIterator() - } - - var count: Int { - return bodies.count - } -} - -extension Resolution: CustomStringConvertible { - var description: String { - switch self { - case .fulfilled(let value): - return "Fulfilled with value: \(value)" - case .rejected(let error): - return "Rejected with error: \(error)" - } - } -} - -extension UnsealedState: CustomStringConvertible { - var description: String { - var rv: String! - get { seal in - switch seal { - case .pending(let handlers): - rv = "Pending with \(handlers.count) handlers" - case .resolved(let resolution): - rv = "\(resolution)" - } - } - return "UnsealedState: \(rv)" - } -} - -extension SealedState: CustomStringConvertible { - var description: String { - return "SealedState: \(resolution)" - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Zalgo.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Zalgo.swift deleted file mode 100644 index b5364fe81dc..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Zalgo.swift +++ /dev/null @@ -1,79 +0,0 @@ -import class Dispatch.DispatchQueue -import class Foundation.Thread - -/** - `zalgo` causes your handlers to be executed as soon as their promise resolves. - - Usually all handlers are dispatched to a queue (the main queue by default); the `on:` parameter of `then` configures this. Its default value is `DispatchQueue.main`. - - - Important: `zalgo` is dangerous. - - Compare: - - var x = 0 - foo.then { - print(x) // => 1 - } - x++ - - With: - - var x = 0 - foo.then(on: zalgo) { - print(x) // => 0 or 1 - } - x++ - - In the latter case the value of `x` may be `0` or `1` depending on whether `foo` is resolved. This is a race-condition that is easily avoided by not using `zalgo`. - - - Important: you cannot control the queue that your handler executes if using `zalgo`. - - - Note: `zalgo` is provided for libraries providing promises that have good tests that prove “Unleashing Zalgo” is safe. You can also use it in your application code in situations where performance is critical, but be careful: read the essay liked below to understand the risks. - - - SeeAlso: [Designing APIs for Asynchrony](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - - SeeAlso: `waldo` - */ -public let zalgo = DispatchQueue(label: "Zalgo") - -/** - `waldo` is dangerous. - - `waldo` is `zalgo`, unless the current queue is the main thread, in which - case we dispatch to the default background queue. - - If your block is likely to take more than a few milliseconds to execute, - then you should use waldo: 60fps means the main thread cannot hang longer - than 17 milliseconds: don’t contribute to UI lag. - - Conversely if your then block is trivial, use zalgo: GCD is not free and - for whatever reason you may already be on the main thread so just do what - you are doing quickly and pass on execution. - - It is considered good practice for asynchronous APIs to complete onto the - main thread. Apple do not always honor this, nor do other developers. - However, they *should*. In that respect waldo is a good choice if your - then is going to take some time and doesn’t interact with the UI. - - Please note (again) that generally you should not use `zalgo` or `waldo`. - The performance gains are negligible and we provide these functions only out - of a misguided sense that library code should be as optimized as possible. - If you use either without tests proving their correctness you may - unwillingly introduce horrendous, near-impossible-to-trace bugs. - - - SeeAlso: `zalgo` - */ -public let waldo = DispatchQueue(label: "Waldo") - -@inline(__always) func contain_zalgo(_ q: DispatchQueue, body: @escaping () -> Void) { - if q === zalgo || q === waldo && !Thread.isMainThread { - body() - } else { - q.async(execute: body) - } -} - -@inline(__always) func contain_zalgo(_ q: DispatchQueue, rejecter reject: @escaping (Resolution) -> Void, block: @escaping () throws -> Void) { - contain_zalgo(q) { - do { try block() } catch { reject(Resolution(error)) } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m deleted file mode 100644 index 25f9966fc59..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; -@import Foundation.NSDate; -@import Foundation.NSValue; - -/// @return A promise that fulfills after the specified duration. -AnyPromise *PMKAfter(NSTimeInterval duration) { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)); - dispatch_after(time, dispatch_get_global_queue(0, 0), ^{ - resolve(@(duration)); - }); - }]; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift deleted file mode 100644 index 902dc4264a3..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift +++ /dev/null @@ -1,37 +0,0 @@ -import struct Foundation.TimeInterval -import Dispatch - -/** - - Returns: A new promise that fulfills after the specified duration. -*/ -@available(*, deprecated: 4.3, message: "Use after(seconds:)") -public func after(interval: TimeInterval) -> Promise { - return after(seconds: interval) -} - -/** - after(.seconds(2)).then { - } - -- Returns: A new promise that fulfills after the specified duration. -*/ -public func after(seconds: TimeInterval) -> Promise { - return Promise { fulfill, _ in - let when = DispatchTime.now() + seconds - DispatchQueue.global().asyncAfter(deadline: when) { fulfill(()) } - } -} - -/** - - Returns: A new promise that fulfills after the specified duration. -*/ -public func after(interval: DispatchTimeInterval) -> Promise { - return Promise { fulfill, _ in - let when = DispatchTime.now() + interval - #if swift(>=4.0) - DispatchQueue.global().asyncAfter(deadline: when) { fulfill(()) } - #else - DispatchQueue.global().asyncAfter(deadline: when, execute: fulfill) - #endif - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m deleted file mode 100644 index ecb89f71118..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; - -AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) { - return [AnyPromise promiseWithValue:nil].thenOn(queue, block); -} - -AnyPromise *dispatch_promise(id block) { - return dispatch_promise_on(dispatch_get_global_queue(0, 0), block); -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/fwd.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/fwd.h deleted file mode 100644 index 26f814431b7..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/fwd.h +++ /dev/null @@ -1,240 +0,0 @@ -#import -#import - -@class AnyPromise; -extern NSString * __nonnull const PMKErrorDomain; - -#define PMKFailingPromiseIndexKey @"PMKFailingPromiseIndexKey" -#define PMKJoinPromisesKey @"PMKJoinPromisesKey" - -#define PMKUnexpectedError 1l -#define PMKInvalidUsageError 3l -#define PMKAccessDeniedError 4l -#define PMKOperationCancelled 5l -#define PMKOperationFailed 8l -#define PMKTaskError 9l -#define PMKJoinError 10l - - -#ifdef __cplusplus -extern "C" { -#endif - -/** - @return A new promise that resolves after the specified duration. - - @parameter duration The duration in seconds to wait before this promise is resolve. - - For example: - - PMKAfter(1).then(^{ - //… - }); -*/ -extern AnyPromise * __nonnull PMKAfter(NSTimeInterval duration) NS_REFINED_FOR_SWIFT; - - - -/** - `when` is a mechanism for waiting more than one asynchronous task and responding when they are all complete. - - `PMKWhen` accepts varied input. If an array is passed then when those promises fulfill, when’s promise fulfills with an array of fulfillment values. If a dictionary is passed then the same occurs, but when’s promise fulfills with a dictionary of fulfillments keyed as per the input. - - Interestingly, if a single promise is passed then when waits on that single promise, and if a single non-promise object is passed then when fulfills immediately with that object. If the array or dictionary that is passed contains objects that are not promises, then these objects are considered fulfilled promises. The reason we do this is to allow a pattern know as "abstracting away asynchronicity". - - If *any* of the provided promises reject, the returned promise is immediately rejected with that promise’s rejection. The error’s `userInfo` object is supplemented with `PMKFailingPromiseIndexKey`. - - For example: - - PMKWhen(@[promise1, promise2]).then(^(NSArray *results){ - //… - }); - - @warning *Important* In the event of rejection the other promises will continue to resolve and as per any other promise will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed. In such situations use `PMKJoin`. - - @param input The input upon which to wait before resolving this promise. - - @return A promise that is resolved with either: - - 1. An array of values from the provided array of promises. - 2. The value from the provided promise. - 3. The provided non-promise object. - - @see PMKJoin - -*/ -extern AnyPromise * __nonnull PMKWhen(id __nonnull input) NS_REFINED_FOR_SWIFT; - - - -/** - Creates a new promise that resolves only when all provided promises have resolved. - - Typically, you should use `PMKWhen`. - - For example: - - PMKJoin(@[promise1, promise2]).then(^(NSArray *resultingValues){ - //… - }).catch(^(NSError *error){ - assert(error.domain == PMKErrorDomain); - assert(error.code == PMKJoinError); - - NSArray *promises = error.userInfo[PMKJoinPromisesKey]; - for (AnyPromise *promise in promises) { - if (promise.rejected) { - //… - } - } - }); - - @param promises An array of promises. - - @return A promise that thens three parameters: - - 1) An array of mixed values and errors from the resolved input. - 2) An array of values from the promises that fulfilled. - 3) An array of errors from the promises that rejected or nil if all promises fulfilled. - - @see when -*/ -AnyPromise *__nonnull PMKJoin(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; - - - -/** - Literally hangs this thread until the promise has resolved. - - Do not use hang… unless you are testing, playing or debugging. - - If you use it in production code I will literally and honestly cry like a child. - - @return The resolved value of the promise. - - @warning T SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NO -*/ -extern id __nullable PMKHang(AnyPromise * __nonnull promise); - - - -/** - Sets the unhandled exception handler. - - If an exception is thrown inside an AnyPromise handler it is caught and - this handler is executed to determine if the promise is rejected. - - The default handler rejects the promise if an NSError or an NSString is - thrown. - - The default handler in PromiseKit 1.x would reject whatever object was - thrown (including nil). - - @warning *Important* This handler is provided to allow you to customize - which exceptions cause rejection and which abort. You should either - return a fully-formed NSError object or nil. Returning nil causes the - exception to be re-thrown. - - @warning *Important* The handler is executed on an undefined queue. - - @warning *Important* This function is thread-safe, but to facilitate this - it can only be called once per application lifetime and it must be called - before any promise in the app throws an exception. Subsequent calls will - silently fail. -*/ -extern void PMKSetUnhandledExceptionHandler(NSError * __nullable (^__nonnull handler)(id __nullable)); - -/** - If an error cascades through a promise chain and is not handled by any - `catch`, the unhandled error handler is called. The default logs all - non-cancelled errors. - - This handler can only be set once, and must be set before any promises - are rejected in your application. - - PMKSetUnhandledErrorHandler({ error in - mylogf("Unhandled error: \(error)") - }) - - - Warning: *Important* The handler is executed on an undefined queue. - - Warning: *Important* Don’t use promises in your handler, or you risk an infinite error loop. -*/ -extern void PMKSetUnhandledErrorHandler(void (^__nonnull handler)(NSError * __nonnull)); - -extern void PMKUnhandledErrorHandler(NSError * __nonnull error); - -/** - Executes the provided block on a background queue. - - dispatch_promise is a convenient way to start a promise chain where the - first step needs to run synchronously on a background queue. - - dispatch_promise(^{ - return md5(input); - }).then(^(NSString *md5){ - NSLog(@"md5: %@", md5); - }); - - @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. - - @return A promise resolved with the return value of the provided block. - - @see dispatch_async -*/ -extern AnyPromise * __nonnull dispatch_promise(id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); - - - -/** - Executes the provided block on the specified background queue. - - dispatch_promise_on(myDispatchQueue, ^{ - return md5(input); - }).then(^(NSString *md5){ - NSLog(@"md5: %@", md5); - }); - - @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. - - @return A promise resolved with the return value of the provided block. - - @see dispatch_promise -*/ -extern AnyPromise * __nonnull dispatch_promise_on(dispatch_queue_t __nonnull queue, id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); - - -#define PMKJSONDeserializationOptions ((NSJSONReadingOptions)(NSJSONReadingAllowFragments | NSJSONReadingMutableContainers)) - -/** - Really we shouldn’t assume JSON for (application|text)/(x-)javascript, - really we should return a String of Javascript. However in practice - for the apps we write it *will be* JSON. Thus if you actually want - a Javascript String, use the promise variant of our category functions. -*/ -#define PMKHTTPURLResponseIsJSON(rsp) [@[@"application/json", @"text/json", @"text/javascript", @"application/x-javascript", @"application/javascript"] containsObject:[rsp MIMEType]] -#define PMKHTTPURLResponseIsImage(rsp) [@[@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap"] containsObject:[rsp MIMEType]] -#define PMKHTTPURLResponseIsText(rsp) [[rsp MIMEType] hasPrefix:@"text/"] - -/** - The default queue for all calls to `then`, `catch` etc. is the main queue. - - By default this returns dispatch_get_main_queue() - */ -extern __nonnull dispatch_queue_t PMKDefaultDispatchQueue(void) NS_REFINED_FOR_SWIFT; - -/** - You may alter the default dispatch queue, but you may only alter it once, and you must alter it before any `then`, etc. calls are made in your app. - - The primary motivation for this function is so that your tests can operate off the main thread preventing dead-locking, or with `zalgo` to speed them up. -*/ -extern void PMKSetDefaultDispatchQueue(__nonnull dispatch_queue_t) NS_REFINED_FOR_SWIFT; - -#ifdef __cplusplus -} // Extern C -#endif - - -typedef NS_OPTIONS(NSInteger, PMKAnimationOptions) { - PMKAnimationOptionsNone = 1 << 0, - PMKAnimationOptionsAppear = 1 << 1, - PMKAnimationOptionsDisappear = 1 << 2, -}; diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m deleted file mode 100644 index 1065d91f2f3..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m +++ /dev/null @@ -1,29 +0,0 @@ -#import "AnyPromise.h" -#import "AnyPromise+Private.h" -@import CoreFoundation.CFRunLoop; - -/** - Suspends the active thread waiting on the provided promise. - - @return The value of the provided promise once resolved. - */ -id PMKHang(AnyPromise *promise) { - if (promise.pending) { - static CFRunLoopSourceContext context; - - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - CFRunLoopSourceRef runLoopSource = CFRunLoopSourceCreate(NULL, 0, &context); - CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - - promise.always(^{ - CFRunLoopStop(runLoop); - }); - while (promise.pending) { - CFRunLoopRun(); - } - CFRunLoopRemoveSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - CFRelease(runLoopSource); - } - - return promise.value; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m deleted file mode 100644 index 979f092df08..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m +++ /dev/null @@ -1,54 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" -#import - -/** - Waits on all provided promises. - - `PMKWhen` rejects as soon as one of the provided promises rejects. `PMKJoin` waits on all provided promises, then rejects if any of those promises rejects, otherwise it fulfills with values from the provided promises. - - - Returns: A new promise that resolves once all the provided promises resolve. -*/ -AnyPromise *PMKJoin(NSArray *promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKJoin(nil)"}]]; - - if (promises.count == 0) - return [AnyPromise promiseWithValue:promises]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSPointerArray *results = NSPointerArrayMake(promises.count); - __block atomic_int countdown = promises.count; - __block BOOL rejected = NO; - - [promises enumerateObjectsUsingBlock:^(AnyPromise *promise, NSUInteger ii, BOOL *stop) { - [promise __pipe:^(id value) { - - if (IsError(value)) { - rejected = YES; - } - - //FIXME surely this isn't thread safe on multiple cores? - [results replacePointerAtIndex:ii withPointer:(__bridge void *)(value ?: [NSNull null])]; - - atomic_fetch_sub_explicit(&countdown, 1, memory_order_relaxed); - - if (countdown == 0) { - if (!rejected) { - resolve(results.allObjects); - } else { - id userInfo = @{PMKJoinPromisesKey: promises}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKJoinError userInfo:userInfo]; - resolve(err); - } - } - }]; - - (void) stop; - }]; - }]; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift deleted file mode 100644 index a50c4665d47..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift +++ /dev/null @@ -1,60 +0,0 @@ -import Dispatch - -/** - Waits on all provided promises. - - `when` rejects as soon as one of the provided promises rejects. `join` waits on all provided promises, then rejects if any of those promises rejected, otherwise it fulfills with values from the provided promises. - - join(promise1, promise2, promise3).then { results in - //… - }.catch { error in - switch error { - case Error.Join(let promises): - //… - } - } - - - Returns: A new promise that resolves once all the provided promises resolve. - - SeeAlso: `PromiseKit.Error.join` -*/ -@available(*, deprecated: 4.0, message: "Use when(resolved:)") -public func join(_ promises: Promise...) -> Promise<[T]> { - return join(promises) -} - -/// Waits on all provided promises. -@available(*, deprecated: 4.0, message: "Use when(resolved:)") -public func join(_ promises: [Promise]) -> Promise { - return join(promises).then(on: zalgo) { (_: [Void]) in return Promise(value: ()) } -} - -/// Waits on all provided promises. -@available(*, deprecated: 4.0, message: "Use when(resolved:)") -public func join(_ promises: [Promise]) -> Promise<[T]> { - guard !promises.isEmpty else { return Promise(value: []) } - - var countdown = promises.count - let barrier = DispatchQueue(label: "org.promisekit.barrier.join", attributes: .concurrent) - var rejected = false - - return Promise { fulfill, reject in - for promise in promises { - promise.state.pipe { resolution in - barrier.sync(flags: .barrier) { - if case .rejected(_, let token) = resolution { - token.consumed = true // the parent Error.Join consumes all - rejected = true - } - countdown -= 1 - if countdown == 0 { - if rejected { - reject(PMKError.join(promises)) - } else { - fulfill(promises.map { $0.value! }) - } - } - } - } - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift deleted file mode 100644 index 9ff17005c9e..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift +++ /dev/null @@ -1,40 +0,0 @@ -/** - Resolves with the first resolving promise from a set of promises. - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: A new promise that resolves when the first promise in the provided promises resolves. - - Warning: If any of the provided promises reject, the returned promise is rejected. - - Warning: aborts if the array is empty. -*/ -public func race(promises: [Promise]) -> Promise { - guard promises.count > 0 else { - fatalError("Cannot race with an empty array of promises") - } - return _race(promises: promises) -} - -/** - Resolves with the first resolving promise from a set of promises. - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: A new promise that resolves when the first promise in the provided promises resolves. - - Warning: If any of the provided promises reject, the returned promise is rejected. - - Warning: aborts if the array is empty. -*/ -public func race(_ promises: Promise...) -> Promise { - return _race(promises: promises) -} - -private func _race(promises: [Promise]) -> Promise { - return Promise(sealant: { resolve in - for promise in promises { - promise.state.pipe(resolve) - } - }) -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m deleted file mode 100644 index cafb54720c9..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m +++ /dev/null @@ -1,100 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -@import Foundation.NSProgress; -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" - -// NSProgress resources: -// * https://robots.thoughtbot.com/asynchronous-nsprogress -// * http://oleb.net/blog/2014/03/nsprogress/ -// NSProgress! Beware! -// * https://github.com/AFNetworking/AFNetworking/issues/2261 - -/** - Wait for all promises in a set to resolve. - - @note If *any* of the provided promises reject, the returned promise is immediately rejected with that error. - @warning In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. - @param promises The promises upon which to wait before the returned promise resolves. - @note PMKWhen provides NSProgress. - @return A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. -*/ -AnyPromise *PMKWhen(id promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKWhen(nil)"}]]; - - if ([promises isKindOfClass:[NSArray class]] || [promises isKindOfClass:[NSDictionary class]]) { - if ([promises count] == 0) - return [AnyPromise promiseWithValue:promises]; - } else if ([promises isKindOfClass:[AnyPromise class]]) { - promises = @[promises]; - } else { - return [AnyPromise promiseWithValue:promises]; - } - -#ifndef PMKDisableProgress - NSProgress *progress = [NSProgress progressWithTotalUnitCount:(int64_t)[promises count]]; - progress.pausable = NO; - progress.cancellable = NO; -#else - struct PMKProgress { - int completedUnitCount; - int totalUnitCount; - double fractionCompleted; - }; - __block struct PMKProgress progress; -#endif - - __block int32_t countdown = (int32_t)[promises count]; - BOOL const isdict = [promises isKindOfClass:[NSDictionary class]]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSInteger index = 0; - - for (__strong id key in promises) { - AnyPromise *promise = isdict ? promises[key] : key; - if (!isdict) key = @(index); - - if (![promise isKindOfClass:[AnyPromise class]]) - promise = [AnyPromise promiseWithValue:promise]; - - [promise __pipe:^(id value){ - if (progress.fractionCompleted >= 1) - return; - - if (IsError(value)) { - progress.completedUnitCount = progress.totalUnitCount; - - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:[value userInfo] ?: @{}]; - userInfo[PMKFailingPromiseIndexKey] = key; - [userInfo setObject:value forKey:NSUnderlyingErrorKey]; - id err = [[NSError alloc] initWithDomain:[value domain] code:[value code] userInfo:userInfo]; - resolve(err); - } - else if (OSAtomicDecrement32(&countdown) == 0) { - progress.completedUnitCount = progress.totalUnitCount; - - id results; - if (isdict) { - results = [NSMutableDictionary new]; - for (id key in promises) { - id promise = promises[key]; - results[key] = IsPromise(promise) ? ((AnyPromise *)promise).value : promise; - } - } else { - results = [NSMutableArray new]; - for (AnyPromise *promise in promises) { - id value = IsPromise(promise) ? (promise.value ?: [NSNull null]) : promise; - [results addObject:value]; - } - } - resolve(results); - } else { - progress.completedUnitCount++; - } - }]; - } - }]; -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift deleted file mode 100644 index 2e48ea4d68b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift +++ /dev/null @@ -1,257 +0,0 @@ -import Foundation -import Dispatch - -private func _when(_ promises: [Promise]) -> Promise { - let root = Promise.pending() - var countdown = promises.count - guard countdown > 0 else { - #if swift(>=4.0) - root.fulfill(()) - #else - root.fulfill() - #endif - return root.promise - } - -#if PMKDisableProgress || os(Linux) - var progress: (completedUnitCount: Int, totalUnitCount: Int) = (0, 0) -#else - let progress = Progress(totalUnitCount: Int64(promises.count)) - progress.isCancellable = false - progress.isPausable = false -#endif - - let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: .concurrent) - - for promise in promises { - promise.state.pipe { resolution in - barrier.sync(flags: .barrier) { - switch resolution { - case .rejected(let error, let token): - token.consumed = true - if root.promise.isPending { - progress.completedUnitCount = progress.totalUnitCount - root.reject(error) - } - case .fulfilled: - guard root.promise.isPending else { return } - progress.completedUnitCount += 1 - countdown -= 1 - if countdown == 0 { - #if swift(>=4.0) - root.fulfill(()) - #else - root.fulfill() - #endif - } - } - } - } - } - - return root.promise -} - -/** - Wait for all promises in a set to fulfill. - - For example: - - when(fulfilled: promise1, promise2).then { results in - //… - }.catch { error in - switch error { - case URLError.notConnectedToInternet: - //… - case CLError.denied: - //… - } - } - - - Note: If *any* of the provided promises reject, the returned promise is immediately rejected with that error. - - Warning: In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. - - Parameter promises: The promises upon which to wait before the returned promise resolves. - - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. - - Note: `when` provides `NSProgress`. - - SeeAlso: `when(resolved:)` -*/ -public func when(fulfilled promises: [Promise]) -> Promise<[T]> { - return _when(promises).then(on: zalgo) { promises.map { $0.value! } } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled promises: Promise...) -> Promise { - return _when(promises) -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled promises: [Promise]) -> Promise { - return _when(promises) -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: Promise, _ pv: Promise) -> Promise<(U, V)> { - return _when([pu.asVoid(), pv.asVoid()]).then(on: zalgo) { (pu.value!, pv.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: Promise, _ pv: Promise, _ pw: Promise) -> Promise<(U, V, W)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid()]).then(on: zalgo) { (pu.value!, pv.value!, pw.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: Promise, _ pv: Promise, _ pw: Promise, _ px: Promise) -> Promise<(U, V, W, X)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid()]).then(on: zalgo) { (pu.value!, pv.value!, pw.value!, px.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: Promise, _ pv: Promise, _ pw: Promise, _ px: Promise, _ py: Promise) -> Promise<(U, V, W, X, Y)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid(), py.asVoid()]).then(on: zalgo) { (pu.value!, pv.value!, pw.value!, px.value!, py.value!) } -} - -/** - Generate promises at a limited rate and wait for all to fulfill. - - For example: - - func downloadFile(url: URL) -> Promise { - // ... - } - - let urls: [URL] = /*…*/ - let urlGenerator = urls.makeIterator() - - let generator = AnyIterator> { - guard url = urlGenerator.next() else { - return nil - } - - return downloadFile(url) - } - - when(generator, concurrently: 3).then { datum: [Data] -> Void in - // ... - } - - - Warning: Refer to the warnings on `when(fulfilled:)` - - Parameter promiseGenerator: Generator of promises. - - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. - - SeeAlso: `when(resolved:)` - */ - -public func when(fulfilled promiseIterator: PromiseIterator, concurrently: Int) -> Promise<[T]> where PromiseIterator.Element == Promise { - - guard concurrently > 0 else { - return Promise(error: PMKError.whenConcurrentlyZero) - } - - var generator = promiseIterator - var root = Promise<[T]>.pending() - var pendingPromises = 0 - var promises: [Promise] = [] - - let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: [.concurrent]) - - func dequeue() { - guard root.promise.isPending else { return } // don’t continue dequeueing if root has been rejected - - var shouldDequeue = false - barrier.sync { - shouldDequeue = pendingPromises < concurrently - } - guard shouldDequeue else { return } - - var index: Int! - var promise: Promise! - - barrier.sync(flags: .barrier) { - guard let next = generator.next() else { return } - - promise = next - index = promises.count - - pendingPromises += 1 - promises.append(next) - } - - func testDone() { - barrier.sync { - if pendingPromises == 0 { - root.fulfill(promises.flatMap { $0.value }) - } - } - } - - guard promise != nil else { - return testDone() - } - - promise.state.pipe { resolution in - barrier.sync(flags: .barrier) { - pendingPromises -= 1 - } - - switch resolution { - case .fulfilled: - dequeue() - testDone() - case .rejected(let error, let token): - token.consumed = true - root.reject(error) - } - } - - dequeue() - } - - dequeue() - - return root.promise -} - -/** - Waits on all provided promises. - - `when(fulfilled:)` rejects as soon as one of the provided promises rejects. `when(resolved:)` waits on all provided promises and **never** rejects. - - when(resolved: promise1, promise2, promise3).then { results in - for result in results where case .fulfilled(let value) { - //… - } - }.catch { error in - // invalid! Never rejects - } - - - Returns: A new promise that resolves once all the provided promises resolve. - - Warning: The returned promise can *not* be rejected. - - Note: Any promises that error are implicitly consumed, your UnhandledErrorHandler will not be called. -*/ -public func when(resolved promises: Promise...) -> Promise<[Result]> { - return when(resolved: promises) -} - -/// Waits on all provided promises. -public func when(resolved promises: [Promise]) -> Promise<[Result]> { - guard !promises.isEmpty else { return Promise(value: []) } - - var countdown = promises.count - let barrier = DispatchQueue(label: "org.promisekit.barrier.join", attributes: .concurrent) - - return Promise { fulfill, _ in - for promise in promises { - promise.state.pipe { resolution in - if case .rejected(_, let token) = resolution { - token.consumed = true // all errors are implicitly consumed - } - var done = false - barrier.sync(flags: .barrier) { - countdown -= 1 - done = countdown == 0 - } - if done { - fulfill(promises.map { Result($0.state.get()!) }) - } - } - } - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/wrap.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/wrap.swift deleted file mode 100644 index 48bd4b1bee0..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/wrap.swift +++ /dev/null @@ -1,79 +0,0 @@ -/** - Create a new pending promise by wrapping another asynchronous system. - - This initializer is convenient when wrapping asynchronous systems that - use common patterns. For example: - - func fetchKitten() -> Promise { - return PromiseKit.wrap { resolve in - KittenFetcher.fetchWithCompletionBlock(resolve) - } - } - - - SeeAlso: Promise.init(resolvers:) -*/ -public func wrap(_ body: (@escaping (T?, Error?) -> Void) throws -> Void) -> Promise { - return Promise { fulfill, reject in - try body { obj, err in - if let err = err { - reject(err) - } else if let obj = obj { - fulfill(obj) - } else { - reject(PMKError.invalidCallingConvention) - } - } - } -} - -/// For completion-handlers that eg. provide an enum or an error. -public func wrap(_ body: (@escaping (T, Error?) -> Void) throws -> Void) -> Promise { - return Promise { fulfill, reject in - try body { obj, err in - if let err = err { - reject(err) - } else { - fulfill(obj) - } - } - } -} - -/// Some APIs unwisely invert the Cocoa standard for completion-handlers. -public func wrap(_ body: (@escaping (Error?, T?) -> Void) throws -> Void) -> Promise { - return Promise { fulfill, reject in - try body { err, obj in - if let err = err { - reject(err) - } else if let obj = obj { - fulfill(obj) - } else { - reject(PMKError.invalidCallingConvention) - } - } - } -} - -/// For completion-handlers with just an optional Error -public func wrap(_ body: (@escaping (Error?) -> Void) throws -> Void) -> Promise { - return Promise { fulfill, reject in - try body { error in - if let error = error { - reject(error) - } else { - #if swift(>=4.0) - fulfill(()) - #else - fulfill() - #endif - } - } - } -} - -/// For completions that cannot error. -public func wrap(_ body: (@escaping (T) -> Void) throws -> Void) -> Promise { - return Promise { fulfill, _ in - try body(fulfill) - } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist deleted file mode 100644 index bb5a9ffc808..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.9.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594242e..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3cd82..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fab6b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig deleted file mode 100644 index 12a1450811b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index 2aba7e548ba..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.7.3 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist deleted file mode 100644 index cba258550bd..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m deleted file mode 100644 index 749b412f85c..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PetstoreClient : NSObject -@end -@implementation PodsDummy_PetstoreClient -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 2a366623a36..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap deleted file mode 100644 index 7fdfc46cf79..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PetstoreClient { - umbrella header "PetstoreClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig deleted file mode 100644 index 69e0045b365..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown deleted file mode 100644 index 5bdac20a177..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown +++ /dev/null @@ -1,50 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Alamofire - -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## PromiseKit - -Copyright 2016, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist deleted file mode 100644 index 315eee1ef8e..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist +++ /dev/null @@ -1,88 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - Alamofire - Type - PSGroupSpecifier - - - FooterText - Copyright 2016, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - License - MIT - Title - PromiseKit - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m deleted file mode 100644 index 6236440163b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClient : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClient -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh deleted file mode 100755 index 9c68a38d70a..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework" - install_framework "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index b7da51aaf25..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig deleted file mode 100644 index 59f45a2a869..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Foundation" -framework "PetstoreClient" -framework "PromiseKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap deleted file mode 100644 index ef919b6c0d1..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClient { - umbrella header "Pods-SwaggerClient-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig deleted file mode 100644 index 59f45a2a869..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Foundation" -framework "PetstoreClient" -framework "PromiseKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist deleted file mode 100644 index 2243fe6e27d..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown deleted file mode 100644 index 102af753851..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist deleted file mode 100644 index 7acbad1eabb..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m deleted file mode 100644 index bb17fa2b80f..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_SwaggerClientTests : NSObject -@end -@implementation PodsDummy_Pods_SwaggerClientTests -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh deleted file mode 100755 index 08e3eaaca45..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 345301f2c5c..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index b2e4925a9e4..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig deleted file mode 100644 index 6750422210a..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Foundation" -framework "PetstoreClient" -framework "PromiseKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap deleted file mode 100644 index a848da7ffb3..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_SwaggerClientTests { - umbrella header "Pods-SwaggerClientTests-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig deleted file mode 100644 index 6750422210a..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PetstoreClient/PetstoreClient.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Foundation" -framework "PetstoreClient" -framework "PromiseKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist deleted file mode 100644 index ee58f387beb..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.4.4 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist deleted file mode 100644 index ee58f387beb..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.4.4 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m deleted file mode 100644 index ce92451305b..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PromiseKit : NSObject -@end -@implementation PodsDummy_PromiseKit -@end diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch deleted file mode 100644 index beb2a244183..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h deleted file mode 100644 index 35cbd796213..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "fwd.h" -#import "AnyPromise.h" -#import "PromiseKit.h" - -FOUNDATION_EXPORT double PromiseKitVersionNumber; -FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; - diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap deleted file mode 100644 index 2b26033e4ab..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PromiseKit { - umbrella header "PromiseKit-umbrella.h" - - export * - module * { export * } -} diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig deleted file mode 100644 index 329063190b5..00000000000 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PromiseKit -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md index 45781360154..57b6e3a17e6 100644 --- a/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/promisekit/docs/Name.md b/samples/client/petstore/swift4/promisekit/docs/Name.md index 2be75d062e4..f7b180292cd 100644 --- a/samples/client/petstore/swift4/promisekit/docs/Name.md +++ b/samples/client/petstore/swift4/promisekit/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md index e3f16038b97..ed537b87598 100644 --- a/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **baz** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/swift4/rxswift/.gitignore b/samples/client/petstore/swift4/rxswift/.gitignore index 5e5d5cebcf4..586cc3f2d73 100644 --- a/samples/client/petstore/swift4/rxswift/.gitignore +++ b/samples/client/petstore/swift4/rxswift/.gitignore @@ -43,18 +43,18 @@ playground.xcworkspace # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts +Carthage/Checkouts Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md diff --git a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION index 0e97bd19efb..c3a2c7076fa 100644 --- a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/Cartfile b/samples/client/petstore/swift4/rxswift/Cartfile index 60ba4967b6d..7f3452d07ee 100644 --- a/samples/client/petstore/swift4/rxswift/Cartfile +++ b/samples/client/petstore/swift4/rxswift/Cartfile @@ -1,2 +1,2 @@ github "Alamofire/Alamofire" ~> 4.9.0 -github "ReactiveX/RxSwift" ~> 4.0 +github "ReactiveX/RxSwift" ~> 4.5.0 diff --git a/samples/client/petstore/swift4/rxswift/Package.swift b/samples/client/petstore/swift4/rxswift/Package.swift new file mode 100644 index 00000000000..6c19a2b64cc --- /dev/null +++ b/samples/client/petstore/swift4/rxswift/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire", "RxSwift"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec b/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec index 3b01a31b978..f520f827f0b 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec @@ -10,6 +10,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'RxSwift', '~> 4.0' + s.dependency 'RxSwift', '~> 4.5.0' s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj index 578d38a3fff..36443e510a8 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj @@ -3,300 +3,300 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 79536B981ECC24C77EB665FDAC7CA7BD /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */; }; + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331 /* RxSwift.framework */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, - 79536B981ECC24C77EB665FDAC7CA7BD /* RxSwift.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */, - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */, - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */, - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */, - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */, - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */, - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */, + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */, + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */, + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */, + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */, + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, - 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -304,12 +304,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -317,108 +317,108 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */, - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */, - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */, - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */, - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */, - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */, + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */, + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */, + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */, + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */, + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -435,7 +435,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -443,7 +446,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -498,11 +501,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -519,7 +522,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -527,7 +533,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -572,8 +578,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -581,25 +587,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453..e8ac84fa992 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..3f1237fee47 --- /dev/null +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/.gitignore new file mode 100644 index 00000000000..0269c2f56db --- /dev/null +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Podfile.lock index 83d09b4381d..d96d208dcb2 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Podfile.lock +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Podfile.lock @@ -9,7 +9,7 @@ DEPENDENCIES: - PetstoreClient (from `../`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Alamofire - RxSwift @@ -24,4 +24,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d -COCOAPODS: 1.6.1 +COCOAPODS: 1.8.0.beta.2 diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/LICENSE b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/LICENSE deleted file mode 100644 index 38a301a1db8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/README.md deleted file mode 100644 index 9fdc9c73873..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/README.md +++ /dev/null @@ -1,242 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) -[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Alamofire is an HTTP networking library written in Swift. - -- [Features](#features) -- [Component Libraries](#component-libraries) -- [Requirements](#requirements) -- [Migration Guides](#migration-guides) -- [Communication](#communication) -- [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md) - - **Intro -** [Making a Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-a-request), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameter Encoding](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#parameter-encoding), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) -- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) - - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-manager), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-delegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request) - - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests) - - **Model Objects -** [Custom Response Serialization](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#custom-response-serialization) - - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability) -- [Open Radars](#open-radars) -- [FAQ](#faq) -- [Credits](#credits) -- [Donations](#donations) -- [License](#license) - -## Features - -- [x] Chainable Request / Response Methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download File using Request or Resume Data -- [x] Authentication with URLCredential -- [x] HTTP Response Validation -- [x] Upload and Download Progress Closures with Progress -- [x] cURL Command Output -- [x] Dynamically Adapt and Retry Requests -- [x] TLS Certificate and Public Key Pinning -- [x] Network Reachability -- [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.3+ -- Swift 3.1+ - -## Migration Guides - -- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication -- If you **need help with making network requests**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. -- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. -- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue and follow the guide. The more detail the better! -- If you **want to contribute**, submit a pull request. - -## Installation - -### CocoaPods - -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 1.7+ is required to build Alamofire 4.9+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '10.0' -use_frameworks! - -target '' do - pod 'Alamofire', '~> 4.9' -end -``` - -Then, run the following command: - -```bash -$ pod install -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](https://brew.sh/) using the following command: - -```bash -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 4.9 -``` - -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - -### Swift Package Manager - -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. - -Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. - -#### Swift 3 - -```swift -dependencies: [ - .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) -] -``` - -#### Swift 4 - -```swift -dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") -] -``` - -### Manually - -If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - - ```bash - $ git init - ``` - -- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command: - - ```bash - $ git submodule add https://github.com/Alamofire/Alamofire.git - ``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- And that's it! - - > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Open Radars - -The following radars have some effect on the current implementation of Alamofire. - -- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- `rdar://26870455` - Background URL Session Configurations do not work in the simulator -- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - -## Resolved Radars - -The following radars have been resolved over time after being filed against the Alamofire project. - -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - -### What logic belongs in a Router vs. a Request Adapter? - -Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. - -The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization. -Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. -Donating to the ASF will enable us to: - -- Pay our yearly legal fees to keep the non-profit in good status -- Pay for our mail servers to help us stay on top of all questions and security issues -- Potentially fund test servers to make it easier for us to test the edge cases -- Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. -We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. -With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. -If you use any of our libraries for work, see if your employers would be interested in donating. -Any amount you can donate today to help us reach our goal would be greatly appreciated. - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ) - -## License - -Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift deleted file mode 100644 index b163f6038fa..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/AFError.swift +++ /dev/null @@ -1,460 +0,0 @@ -// -// AFError.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with -/// their own associated reasons. -/// -/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. -/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. -/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. -/// - responseValidationFailed: Returned when a `validate()` call fails. -/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. -public enum AFError: Error { - /// The underlying reason the parameter encoding error occurred. - /// - /// - missingURL: The URL request did not have a URL to encode. - /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the - /// encoding process. - /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during - /// encoding process. - public enum ParameterEncodingFailureReason { - case missingURL - case jsonEncodingFailed(error: Error) - case propertyListEncodingFailed(error: Error) - } - - /// The underlying reason the multipart encoding error occurred. - /// - /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a - /// file URL. - /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty - /// `lastPathComponent` or `pathExtension. - /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. - /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw - /// an error. - /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. - /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by - /// the system. - /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided - /// threw an error. - /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. - /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the - /// encoded data to disk. - /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file - /// already exists at the provided `fileURL`. - /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is - /// not a file URL. - /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an - /// underlying error. - /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with - /// underlying system error. - public enum MultipartEncodingFailureReason { - case bodyPartURLInvalid(url: URL) - case bodyPartFilenameInvalid(in: URL) - case bodyPartFileNotReachable(at: URL) - case bodyPartFileNotReachableWithError(atURL: URL, error: Error) - case bodyPartFileIsDirectory(at: URL) - case bodyPartFileSizeNotAvailable(at: URL) - case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) - case bodyPartInputStreamCreationFailed(for: URL) - - case outputStreamCreationFailed(for: URL) - case outputStreamFileAlreadyExists(at: URL) - case outputStreamURLInvalid(url: URL) - case outputStreamWriteFailed(error: Error) - - case inputStreamReadFailed(error: Error) - } - - /// The underlying reason the response validation error occurred. - /// - /// - dataFileNil: The data file containing the server response did not exist. - /// - dataFileReadFailed: The data file containing the server response could not be read. - /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` - /// provided did not contain wildcard type. - /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided - /// `acceptableContentTypes`. - /// - unacceptableStatusCode: The response status code was not acceptable. - public enum ResponseValidationFailureReason { - case dataFileNil - case dataFileReadFailed(at: URL) - case missingContentType(acceptableContentTypes: [String]) - case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) - case unacceptableStatusCode(code: Int) - } - - /// The underlying reason the response serialization error occurred. - /// - /// - inputDataNil: The server response contained no data. - /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. - /// - inputFileNil: The file containing the server response did not exist. - /// - inputFileReadFailed: The file containing the server response could not be read. - /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. - /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. - /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. - public enum ResponseSerializationFailureReason { - case inputDataNil - case inputDataNilOrZeroLength - case inputFileNil - case inputFileReadFailed(at: URL) - case stringSerializationFailed(encoding: String.Encoding) - case jsonSerializationFailed(error: Error) - case propertyListSerializationFailed(error: Error) - } - - case invalidURL(url: URLConvertible) - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) - case multipartEncodingFailed(reason: MultipartEncodingFailureReason) - case responseValidationFailed(reason: ResponseValidationFailureReason) - case responseSerializationFailed(reason: ResponseSerializationFailureReason) -} - -// MARK: - Adapt Error - -struct AdaptError: Error { - let error: Error -} - -extension Error { - var underlyingAdaptError: Error? { return (self as? AdaptError)?.error } -} - -// MARK: - Error Booleans - -extension AFError { - /// Returns whether the AFError is an invalid URL error. - public var isInvalidURLError: Bool { - if case .invalidURL = self { return true } - return false - } - - /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncodingError: Bool { - if case .parameterEncodingFailed = self { return true } - return false - } - - /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties - /// will contain the associated values. - public var isMultipartEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, and `responseCode` properties will contain the associated values. - public var isResponseValidationError: Bool { - if case .responseValidationFailed = self { return true } - return false - } - - /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and - /// `underlyingError` properties will contain the associated values. - public var isResponseSerializationError: Bool { - if case .responseSerializationFailed = self { return true } - return false - } -} - -// MARK: - Convenience Properties - -extension AFError { - /// The `URLConvertible` associated with the error. - public var urlConvertible: URLConvertible? { - switch self { - case .invalidURL(let url): - return url - default: - return nil - } - } - - /// The `URL` associated with the error. - public var url: URL? { - switch self { - case .multipartEncodingFailed(let reason): - return reason.url - default: - return nil - } - } - - /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, - /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. - public var underlyingError: Error? { - switch self { - case .parameterEncodingFailed(let reason): - return reason.underlyingError - case .multipartEncodingFailed(let reason): - return reason.underlyingError - case .responseSerializationFailed(let reason): - return reason.underlyingError - default: - return nil - } - } - - /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. - public var acceptableContentTypes: [String]? { - switch self { - case .responseValidationFailed(let reason): - return reason.acceptableContentTypes - default: - return nil - } - } - - /// The response `Content-Type` of a `.responseValidationFailed` error. - public var responseContentType: String? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseContentType - default: - return nil - } - } - - /// The response code of a `.responseValidationFailed` error. - public var responseCode: Int? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseCode - default: - return nil - } - } - - /// The `String.Encoding` associated with a failed `.stringResponse()` call. - public var failedStringEncoding: String.Encoding? { - switch self { - case .responseSerializationFailed(let reason): - return reason.failedStringEncoding - default: - return nil - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var underlyingError: Error? { - switch self { - case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var url: URL? { - switch self { - case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), - .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), - .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), - .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), - .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): - return url - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), - .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): - return error - default: - return nil - } - } -} - -extension AFError.ResponseValidationFailureReason { - var acceptableContentTypes: [String]? { - switch self { - case .missingContentType(let types), .unacceptableContentType(let types, _): - return types - default: - return nil - } - } - - var responseContentType: String? { - switch self { - case .unacceptableContentType(_, let responseType): - return responseType - default: - return nil - } - } - - var responseCode: Int? { - switch self { - case .unacceptableStatusCode(let code): - return code - default: - return nil - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var failedStringEncoding: String.Encoding? { - switch self { - case .stringSerializationFailed(let encoding): - return encoding - default: - return nil - } - } - - var underlyingError: Error? { - switch self { - case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): - return error - default: - return nil - } - } -} - -// MARK: - Error Descriptions - -extension AFError: LocalizedError { - public var errorDescription: String? { - switch self { - case .invalidURL(let url): - return "URL is not valid: \(url)" - case .parameterEncodingFailed(let reason): - return reason.localizedDescription - case .multipartEncodingFailed(let reason): - return reason.localizedDescription - case .responseValidationFailed(let reason): - return reason.localizedDescription - case .responseSerializationFailed(let reason): - return reason.localizedDescription - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var localizedDescription: String { - switch self { - case .missingURL: - return "URL request to encode was missing a URL" - case .jsonEncodingFailed(let error): - return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case .propertyListEncodingFailed(let error): - return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var localizedDescription: String { - switch self { - case .bodyPartURLInvalid(let url): - return "The URL provided is not a file URL: \(url)" - case .bodyPartFilenameInvalid(let url): - return "The URL provided does not have a valid filename: \(url)" - case .bodyPartFileNotReachable(let url): - return "The URL provided is not reachable: \(url)" - case .bodyPartFileNotReachableWithError(let url, let error): - return ( - "The system returned an error while checking the provided URL for " + - "reachability.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartFileIsDirectory(let url): - return "The URL provided is a directory: \(url)" - case .bodyPartFileSizeNotAvailable(let url): - return "Could not fetch the file size from the provided URL: \(url)" - case .bodyPartFileSizeQueryFailedWithError(let url, let error): - return ( - "The system returned an error while attempting to fetch the file size from the " + - "provided URL.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartInputStreamCreationFailed(let url): - return "Failed to create an InputStream for the provided URL: \(url)" - case .outputStreamCreationFailed(let url): - return "Failed to create an OutputStream for URL: \(url)" - case .outputStreamFileAlreadyExists(let url): - return "A file already exists at the provided URL: \(url)" - case .outputStreamURLInvalid(let url): - return "The provided OutputStream URL is invalid: \(url)" - case .outputStreamWriteFailed(let error): - return "OutputStream write failed with error: \(error)" - case .inputStreamReadFailed(let error): - return "InputStream read failed with error: \(error)" - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var localizedDescription: String { - switch self { - case .inputDataNil: - return "Response could not be serialized, input data was nil." - case .inputDataNilOrZeroLength: - return "Response could not be serialized, input data was nil or zero length." - case .inputFileNil: - return "Response could not be serialized, input file was nil." - case .inputFileReadFailed(let url): - return "Response could not be serialized, input file could not be read: \(url)." - case .stringSerializationFailed(let encoding): - return "String could not be serialized with encoding: \(encoding)." - case .jsonSerializationFailed(let error): - return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case .propertyListSerializationFailed(let error): - return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.ResponseValidationFailureReason { - var localizedDescription: String { - switch self { - case .dataFileNil: - return "Response could not be validated, data file was nil." - case .dataFileReadFailed(let url): - return "Response could not be validated, data file could not be read: \(url)." - case .missingContentType(let types): - return ( - "Response Content-Type was missing and acceptable content types " + - "(\(types.joined(separator: ","))) do not match \"*/*\"." - ) - case .unacceptableContentType(let acceptableTypes, let responseType): - return ( - "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + - "\(acceptableTypes.joined(separator: ","))." - ) - case .unacceptableStatusCode(let code): - return "Response status code was unacceptable: \(code)." - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index 20c3672fbaf..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,465 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct -/// URL requests. -public protocol URLConvertible { - /// Returns a URL that conforms to RFC 2396 or throws an `Error`. - /// - /// - throws: An `Error` if the type cannot be converted to a `URL`. - /// - /// - returns: A URL or throws an `Error`. - func asURL() throws -> URL -} - -extension String: URLConvertible { - /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. - /// - /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } - return url - } -} - -extension URL: URLConvertible { - /// Returns self. - public func asURL() throws -> URL { return self } -} - -extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherwise throws an `Error`. - /// - /// - throws: An `AFError.invalidURL` if `url` is `nil`. - /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = url else { throw AFError.invalidURL(url: self) } - return url - } -} - -// MARK: - - -/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -public protocol URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - /// - /// - throws: An `Error` if the underlying `URLRequest` is `nil`. - /// - /// - returns: A URL request. - func asURLRequest() throws -> URLRequest -} - -extension URLRequestConvertible { - /// The URL request. - public var urlRequest: URLRequest? { return try? asURLRequest() } -} - -extension URLRequest: URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - public func asURLRequest() throws -> URLRequest { return self } -} - -// MARK: - - -extension URLRequest { - /// Creates an instance with the specified `method`, `urlString` and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The new `URLRequest` instance. - public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { - let url = try url.asURL() - - self.init(url: url) - - httpMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - setValue(headerValue, forHTTPHeaderField: headerField) - } - } - } - - func adapt(using adapter: RequestAdapter?) throws -> URLRequest { - guard let adapter = adapter else { return self } - return try adapter.adapt(self) - } -} - -// MARK: - Data Request - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding` and `headers`. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest -{ - return SessionManager.default.request( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest`. -/// -/// - parameter urlRequest: The URL request -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - return SessionManager.default.request(urlRequest) -} - -// MARK: - Download Request - -// MARK: URL Request - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - to: destination - ) -} - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter urlRequest: The URL request. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(urlRequest, to: destination) -} - -// MARK: Resume Data - -/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a -/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken -/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the -/// data is written incorrectly and will always fail to resume the download. For more information about the bug and -/// possible workarounds, please refer to the following Stack Overflow post: -/// -/// - http://stackoverflow.com/a/39347461/1342462 -/// -/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` -/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional -/// information. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(resumingWith: resumeData, to: destination) -} - -// MARK: - Upload Request - -// MARK: File - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) -} - -/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(fileURL, with: urlRequest) -} - -// MARK: Data - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(data, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(data, with: urlRequest) -} - -// MARK: InputStream - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `stream`. -/// -/// - parameter stream: The stream to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(stream, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `stream`. -/// -/// - parameter urlRequest: The URL request. -/// - parameter stream: The stream to upload. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(stream, with: urlRequest) -} - -// MARK: MultipartFormData - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls -/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - to: url, - method: method, - headers: headers, - encodingCompletion: encodingCompletion - ) -} - -/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and -/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter urlRequest: The URL request. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - encodingCompletion: encodingCompletion - ) -} - -#if !os(watchOS) - -// MARK: - Stream Request - -// MARK: Hostname and Port - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` -/// and `port`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter hostName: The hostname of the server to connect to. -/// - parameter port: The port of the server to connect to. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return SessionManager.default.stream(withHostName: hostName, port: port) -} - -// MARK: NetService - -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter netService: The net service used to identify the endpoint. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(with netService: NetService) -> StreamRequest { - return SessionManager.default.stream(with: netService) -} - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift deleted file mode 100644 index a54673cca61..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DispatchQueue+Alamofire.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Dispatch -import Foundation - -extension DispatchQueue { - static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } - static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } - static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } - static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } - - func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { - asyncAfter(deadline: .now() + delay, execute: closure) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index b840138ccc1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,580 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(macOS) -import CoreServices -#endif - -/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode -/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead -/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the -/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for -/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -/// -/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well -/// and the w3 form documentation. -/// -/// - https://www.ietf.org/rfc/rfc2388.txt -/// - https://www.ietf.org/rfc/rfc2045.txt -/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -open class MultipartFormData { - - // MARK: - Helper Types - - struct EncodingCharacters { - static let crlf = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case initial, encapsulated, final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { - let boundaryText: String - - switch boundaryType { - case .initial: - boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" - case .encapsulated: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" - case .final: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" - } - - return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - } - - class BodyPart { - let headers: HTTPHeaders - let bodyStream: InputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public var boundary: String - - private var bodyParts: [BodyPart] - private var bodyPartError: AFError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /// Creates a multipart form data object. - /// - /// - returns: The multipart form data object. - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /// - /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - /// information, please refer to the following article: - /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - /// - - self.streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - public func append(_ data: Data, withName name: String) { - let headers = contentHeaders(withName: name) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, mimeType: String) { - let headers = contentHeaders(withName: name, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - /// system associated MIME type. - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - public func append(_ fileURL: URL, withName name: String) { - let fileName = fileURL.lastPathComponent - let pathExtension = fileURL.pathExtension - - if !fileName.isEmpty && !pathExtension.isEmpty { - let mime = mimeType(forPathExtension: pathExtension) - append(fileURL, withName: name, fileName: fileName, mimeType: mime) - } else { - setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) - } - } - - /// Creates a body part from the file and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - /// - Content-Type: #{mimeType} (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.isFileURL else { - setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - do { - let isReachable = try fileURL.checkPromisedItemIsReachable() - guard isReachable else { - setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) - return - } - } catch { - setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - let path = fileURL.path - - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - let bodyContentLength: UInt64 - - do { - guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { - setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) - return - } - - bodyContentLength = fileSize.uint64Value - } - catch { - setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = InputStream(url: fileURL) else { - setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) - return - } - - append(stream, withLength: bodyContentLength, headers: headers) - } - - /// Creates a body part from the stream and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append( - _ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) - { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - HTTP headers - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter headers: The HTTP headers for the body part. - public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /// Encodes all the appended body parts into a single `Data` value. - /// - /// It is important to note that this method will load all the appended body parts into memory all at the same - /// time. This method should only be used when the encoded data will have a small memory footprint. For large data - /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - /// - /// - throws: An `AFError` if encoding encounters an error. - /// - /// - returns: The encoded `Data` if encoding is successful. - public func encode() throws -> Data { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - var encoded = Data() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encode(bodyPart) - encoded.append(encodedData) - } - - return encoded - } - - /// Writes the appended body parts into the given file URL. - /// - /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, - /// this approach is very memory efficient and should be used for large body part data. - /// - /// - parameter fileURL: The file URL to write the multipart form data into. - /// - /// - throws: An `AFError` if encoding encounters an error. - public func writeEncodedData(to fileURL: URL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if FileManager.default.fileExists(atPath: fileURL.path) { - throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) - } else if !fileURL.isFileURL { - throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) - } - - guard let outputStream = OutputStream(url: fileURL, append: false) else { - throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) - } - - outputStream.open() - defer { outputStream.close() } - - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true - - for bodyPart in self.bodyParts { - try write(bodyPart, to: outputStream) - } - } - - // MARK: - Private - Body Part Encoding - - private func encode(_ bodyPart: BodyPart) throws -> Data { - var encoded = Data() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.append(initialData) - - let headerData = encodeHeaders(for: bodyPart) - encoded.append(headerData) - - let bodyStreamData = try encodeBodyStream(for: bodyPart) - encoded.append(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.append(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaders(for bodyPart: BodyPart) -> Data { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.crlf)" - } - headerText += EncodingCharacters.crlf - - return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! - } - - private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { - let inputStream = bodyPart.bodyStream - inputStream.open() - defer { inputStream.close() } - - var encoded = Data() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let error = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - if bytesRead > 0 { - encoded.append(buffer, count: bytesRead) - } else { - break - } - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { - try writeInitialBoundaryData(for: bodyPart, to: outputStream) - try writeHeaderData(for: bodyPart, to: outputStream) - try writeBodyStream(for: bodyPart, to: outputStream) - try writeFinalBoundaryData(for: bodyPart, to: outputStream) - } - - private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try write(initialData, to: outputStream) - } - - private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let headerData = encodeHeaders(for: bodyPart) - return try write(headerData, to: outputStream) - } - - private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let inputStream = bodyPart.bodyStream - - inputStream.open() - defer { inputStream.close() } - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let error = outputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if - let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { - var disposition = "form-data; name=\"\(name)\"" - if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - - var headers = ["Content-Disposition": disposition] - if let mimeType = mimeType { headers["Content-Type"] = mimeType } - - return headers - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { - guard bodyPartError == nil else { return } - bodyPartError = AFError.multipartEncodingFailed(reason: reason) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index 398ca827c2b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,238 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if !os(watchOS) - -import Foundation -import SystemConfiguration - -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and -/// WiFi network interfaces. -/// -/// Reachability can be used to determine background information about why a network operation failed, or to retry -/// network requests when a connection is established. It should not be used to prevent a user from initiating a network -/// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /// Defines the various states of network reachability. - /// - /// - unknown: It is unknown whether the network is reachable. - /// - notReachable: The network is not reachable. - /// - reachable: The network is reachable. - public enum NetworkReachabilityStatus { - case unknown - case notReachable - case reachable(ConnectionType) - } - - /// Defines the various connection types detected by reachability flags. - /// - /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. - /// - wwan: The connection type is a WWAN connection. - public enum ConnectionType { - case ethernetOrWiFi - case wwan - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = (NetworkReachabilityStatus) -> Void - - // MARK: - Properties - - /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } - - /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .unknown } - return networkReachabilityStatusForFlags(flags) - } - - /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main - - /// A closure executed when the network reachability status changes. - open var listener: Listener? - - open var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - if SCNetworkReachabilityGetFlags(reachability, &flags) { - return flags - } - - return nil - } - - private let reachability: SCNetworkReachability - open var previousFlags: SCNetworkReachabilityFlags - - // MARK: - Initialization - - /// Creates a `NetworkReachabilityManager` instance with the specified host. - /// - /// - parameter host: The host used to evaluate network reachability. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - self.init(reachability: reachability) - } - - /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. - /// - /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - /// status of the device, both IPv4 and IPv6. - /// - /// - returns: The new `NetworkReachabilityManager` instance. - public convenience init?() { - var address = sockaddr_in() - address.sin_len = UInt8(MemoryLayout.size) - address.sin_family = sa_family_t(AF_INET) - - guard let reachability = withUnsafePointer(to: &address, { pointer in - return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { - return SCNetworkReachabilityCreateWithAddress(nil, $0) - } - }) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - - // Set the previous flags to an unreserved value to represent unknown status - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /// Starts listening for changes in network reachability status. - /// - /// - returns: `true` if listening was started successfully, `false` otherwise. - @discardableResult - open func startListening() -> Bool { - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = Unmanaged.passUnretained(self).toOpaque() - - let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() - reachability.notifyListener(flags) - }, - &context - ) - - let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - - listenerQueue.async { - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) - - guard let flags = self.flags else { return } - - self.notifyListener(flags) - } - - return callbackEnabled && queueEnabled - } - - /// Stops listening for changes in network reachability status. - open func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - } - - // MARK: - Internal - Listener Notification - - func notifyListener(_ flags: SCNetworkReachabilityFlags) { - guard previousFlags != flags else { return } - previousFlags = flags - - listener?(networkReachabilityStatusForFlags(flags)) - } - - // MARK: - Internal - Network Reachability Status - - func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard isNetworkReachable(with: flags) else { return .notReachable } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif - - return networkStatus - } - - func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { - let isReachable = flags.contains(.reachable) - let needsConnection = flags.contains(.connectionRequired) - let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) - let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - - return isReachable && (!needsConnection || canConnectWithoutUserInteraction) - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -/// Returns whether the two network reachability status values are equal. -/// -/// - parameter lhs: The left-hand side value to compare. -/// - parameter rhs: The right-hand side value to compare. -/// -/// - returns: `true` if the two values are equal, `false` otherwise. -public func ==( - lhs: NetworkReachabilityManager.NetworkReachabilityStatus, - rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ - switch (lhs, rhs) { - case (.unknown, .unknown): - return true - case (.notReachable, .notReachable): - return true - case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): - return lhsConnectionType == rhsConnectionType - default: - return false - } -} - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index e1ac31bf327..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Notification.Name { - /// Used as a namespace for all `URLSessionTask` related notifications. - public struct Task { - /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. - public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") - - /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. - public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") - - /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. - public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") - - /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. - public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") - } -} - -// MARK: - - -extension Notification { - /// Used as a namespace for all `Notification` user info dictionary keys. - public struct Key { - /// User info dictionary key representing the `URLSessionTask` associated with the notification. - public static let Task = "org.alamofire.notification.key.task" - - /// User info dictionary key representing the responseData associated with the notification. - public static let ResponseData = "org.alamofire.notification.key.responseData" - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index 6195809c5db..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,483 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// HTTP method definitions. -/// -/// See https://tools.ietf.org/html/rfc7231#section-4.3 -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -// MARK: - - -/// A dictionary of parameters to apply to a `URLRequest`. -public typealias Parameters = [String: Any] - -/// A type used to define how a set of parameters are applied to a `URLRequest`. -public protocol ParameterEncoding { - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. - /// - /// - returns: The encoded request. - func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest -} - -// MARK: - - -/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP -/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as -/// the HTTP body depends on the destination of the encoding. -/// -/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// There is no published specification for how to encode collection types. By default the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -public struct URLEncoding: ParameterEncoding { - - // MARK: Helper Types - - /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the - /// resulting URL request. - /// - /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` - /// requests and sets as the HTTP body for requests with any other HTTP method. - /// - queryString: Sets or appends encoded query string result to existing query string. - /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. - public enum Destination { - case methodDependent, queryString, httpBody - } - - /// Configures how `Array` parameters are encoded. - /// - /// - brackets: An empty set of square brackets is appended to the key for every value. - /// This is the default behavior. - /// - noBrackets: No brackets are appended. The key is encoded as is. - public enum ArrayEncoding { - case brackets, noBrackets - - func encode(key: String) -> String { - switch self { - case .brackets: - return "\(key)[]" - case .noBrackets: - return key - } - } - } - - /// Configures how `Bool` parameters are encoded. - /// - /// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior. - /// - literal: Encode `true` and `false` as string literals. - public enum BoolEncoding { - case numeric, literal - - func encode(value: Bool) -> String { - switch self { - case .numeric: - return value ? "1" : "0" - case .literal: - return value ? "true" : "false" - } - } - } - - // MARK: Properties - - /// Returns a default `URLEncoding` instance. - public static var `default`: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.methodDependent` destination. - public static var methodDependent: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.queryString` destination. - public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - - /// Returns a `URLEncoding` instance with an `.httpBody` destination. - public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - - /// The destination defining where the encoded query string is to be applied to the URL request. - public let destination: Destination - - /// The encoding to use for `Array` parameters. - public let arrayEncoding: ArrayEncoding - - /// The encoding to use for `Bool` parameters. - public let boolEncoding: BoolEncoding - - // MARK: Initialization - - /// Creates a `URLEncoding` instance using the specified destination. - /// - /// - parameter destination: The destination defining where the encoded query string is to be applied. - /// - parameter arrayEncoding: The encoding to use for `Array` parameters. - /// - parameter boolEncoding: The encoding to use for `Bool` parameters. - /// - /// - returns: The new `URLEncoding` instance. - public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) { - self.destination = destination - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { - guard let url = urlRequest.url else { - throw AFError.parameterEncodingFailed(reason: .missingURL) - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - urlComponents.percentEncodedQuery = percentEncodedQuery - urlRequest.url = urlComponents.url - } - } else { - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) - } - - return urlRequest - } - - /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - /// - /// - parameter key: The key of the query component. - /// - parameter value: The value of the query component. - /// - /// - returns: The percent-escaped, URL encoded query string components. - public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: Any] { - for (nestedKey, value) in dictionary { - components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) - } - } else if let array = value as? [Any] { - for value in array { - components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) - } - } else if let value = value as? NSNumber { - if value.isBool { - components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - } else if let bool = value as? Bool { - components.append((escape(key), escape(boolEncoding.encode(value: bool)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /// Returns a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - /// should be percent-escaped in the query string. - /// - /// - parameter string: The string to be percent-escaped. - /// - /// - returns: The percent-escaped string. - public func escape(_ string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - var allowedCharacterSet = CharacterSet.urlQueryAllowed - allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, *) { - escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex - let range = startIndex.. String { - var components: [(String, String)] = [] - - for key in parameters.keys.sorted(by: <) { - let value = parameters[key]! - components += queryComponents(fromKey: key, value: value) - } - return components.map { "\($0)=\($1)" }.joined(separator: "&") - } - - private func encodesParametersInURL(with method: HTTPMethod) -> Bool { - switch destination { - case .queryString: - return true - case .httpBody: - return false - default: - break - } - - switch method { - case .get, .head, .delete: - return true - default: - return false - } - } -} - -// MARK: - - -/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the -/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -public struct JSONEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a `JSONEncoding` instance with default writing options. - public static var `default`: JSONEncoding { return JSONEncoding() } - - /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. - public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } - - /// The options for writing the parameters as JSON data. - public let options: JSONSerialization.WritingOptions - - // MARK: Initialization - - /// Creates a `JSONEncoding` instance using the specified options. - /// - /// - parameter options: The options for writing the parameters as JSON data. - /// - /// - returns: The new `JSONEncoding` instance. - public init(options: JSONSerialization.WritingOptions = []) { - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: parameters, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } - - /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. - /// - /// - parameter urlRequest: The request to apply the JSON object to. - /// - parameter jsonObject: The JSON object to apply to the request. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonObject = jsonObject else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the -/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header -/// field of an encoded request is set to `application/x-plist`. -public struct PropertyListEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a default `PropertyListEncoding` instance. - public static var `default`: PropertyListEncoding { return PropertyListEncoding() } - - /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. - public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } - - /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. - public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } - - /// The property list serialization format. - public let format: PropertyListSerialization.PropertyListFormat - - /// The options for writing the parameters as plist data. - public let options: PropertyListSerialization.WriteOptions - - // MARK: Initialization - - /// Creates a `PropertyListEncoding` instance using the specified format and options. - /// - /// - parameter format: The property list serialization format. - /// - parameter options: The options for writing the parameters as plist data. - /// - /// - returns: The new `PropertyListEncoding` instance. - public init( - format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { - self.format = format - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try PropertyListSerialization.data( - fromPropertyList: parameters, - format: format, - options: options - ) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -extension NSNumber { - fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index 2be2ce0106f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,660 +0,0 @@ -// -// Request.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. -public protocol RequestAdapter { - /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. - /// - /// - parameter urlRequest: The URL request to adapt. - /// - /// - throws: An `Error` if the adaptation encounters an error. - /// - /// - returns: The adapted `URLRequest`. - func adapt(_ urlRequest: URLRequest) throws -> URLRequest -} - -// MARK: - - -/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. -public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void - -/// A type that determines whether a request should be retried after being executed by the specified session manager -/// and encountering an error. -public protocol RequestRetrier { - /// Determines whether the `Request` should be retried by calling the `completion` closure. - /// - /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs - /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly - /// cleaned up after. - /// - /// - parameter manager: The session manager the request was executed on. - /// - parameter request: The request that failed due to the encountered error. - /// - parameter error: The error encountered when executing the request. - /// - parameter completion: The completion closure to be executed when retry decision has been determined. - func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) -} - -// MARK: - - -protocol TaskConvertible { - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask -} - -/// A dictionary of headers to apply to a `URLRequest`. -public typealias HTTPHeaders = [String: String] - -// MARK: - - -/// Responsible for sending a request and receiving the response and associated data from the server, as well as -/// managing its underlying `URLSessionTask`. -open class Request { - - // MARK: Helper Types - - /// A closure executed when monitoring upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void - - enum RequestTask { - case data(TaskConvertible?, URLSessionTask?) - case download(TaskConvertible?, URLSessionTask?) - case upload(TaskConvertible?, URLSessionTask?) - case stream(TaskConvertible?, URLSessionTask?) - } - - // MARK: Properties - - /// The delegate for the underlying task. - open internal(set) var delegate: TaskDelegate { - get { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - return taskDelegate - } - set { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - taskDelegate = newValue - } - } - - /// The underlying task. - open var task: URLSessionTask? { return delegate.task } - - /// The session belonging to the underlying task. - public let session: URLSession - - /// The request sent or to be sent to the server. - open var request: URLRequest? { return task?.originalRequest } - - /// The response received from the server, if any. - open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } - - /// The number of times the request has been retried. - open internal(set) var retryCount: UInt = 0 - - let originalTask: TaskConvertible? - - var startTime: CFAbsoluteTime? - var endTime: CFAbsoluteTime? - - var validations: [() -> Void] = [] - - private var taskDelegate: TaskDelegate - private var taskDelegateLock = NSLock() - - // MARK: Lifecycle - - init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { - self.session = session - - switch requestTask { - case .data(let originalTask, let task): - taskDelegate = DataTaskDelegate(task: task) - self.originalTask = originalTask - case .download(let originalTask, let task): - taskDelegate = DownloadTaskDelegate(task: task) - self.originalTask = originalTask - case .upload(let originalTask, let task): - taskDelegate = UploadTaskDelegate(task: task) - self.originalTask = originalTask - case .stream(let originalTask, let task): - taskDelegate = TaskDelegate(task: task) - self.originalTask = originalTask - } - - delegate.error = error - delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } - } - - // MARK: Authentication - - /// Associates an HTTP Basic credential with the request. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - parameter persistence: The URL credential persistence. `.ForSession` by default. - /// - /// - returns: The request. - @discardableResult - open func authenticate( - user: String, - password: String, - persistence: URLCredential.Persistence = .forSession) - -> Self - { - let credential = URLCredential(user: user, password: password, persistence: persistence) - return authenticate(usingCredential: credential) - } - - /// Associates a specified credential with the request. - /// - /// - parameter credential: The credential. - /// - /// - returns: The request. - @discardableResult - open func authenticate(usingCredential credential: URLCredential) -> Self { - delegate.credential = credential - return self - } - - /// Returns a base64 encoded basic authentication credential as an authorization header tuple. - /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. - open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { - guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } - - let credential = data.base64EncodedString(options: []) - - return (key: "Authorization", value: "Basic \(credential)") - } - - // MARK: State - - /// Resumes the request. - open func resume() { - guard let task = task else { delegate.queue.isSuspended = false ; return } - - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - task.resume() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidResume, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Suspends the request. - open func suspend() { - guard let task = task else { return } - - task.suspend() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidSuspend, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } - - /// Cancels the request. - open func cancel() { - guard let task = task else { return } - - task.cancel() - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task] - ) - } -} - -// MARK: - CustomStringConvertible - -extension Request: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as - /// well as the response status code if a response has been received. - open var description: String { - var components: [String] = [] - - if let HTTPMethod = request?.httpMethod { - components.append(HTTPMethod) - } - - if let urlString = request?.url?.absoluteString { - components.append(urlString) - } - - if let response = response { - components.append("(\(response.statusCode))") - } - - return components.joined(separator: " ") - } -} - -// MARK: - CustomDebugStringConvertible - -extension Request: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, in the form of a cURL command. - open var debugDescription: String { - return cURLRepresentation() - } - - func cURLRepresentation() -> String { - var components = ["$ curl -v"] - - guard let request = self.request, - let url = request.url, - let host = url.host - else { - return "$ curl command could not be created" - } - - if let httpMethod = request.httpMethod, httpMethod != "GET" { - components.append("-X \(httpMethod)") - } - - if let credentialStorage = self.session.configuration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace( - host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) - - if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { - for credential in credentials { - guard let user = credential.user, let password = credential.password else { continue } - components.append("-u \(user):\(password)") - } - } else { - if let credential = delegate.credential, let user = credential.user, let password = credential.password { - components.append("-u \(user):\(password)") - } - } - } - - if session.configuration.httpShouldSetCookies { - if - let cookieStorage = session.configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } - - #if swift(>=3.2) - components.append("-b \"\(string[.. URLSessionTask { - do { - let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.sync { session.dataTask(with: urlRequest) } - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - if let requestable = originalTask as? Requestable { return requestable.urlRequest } - - return nil - } - - /// The progress of fetching the response data from the server for the request. - open var progress: Progress { return dataDelegate.progress } - - var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } - - // MARK: Stream - - /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. - /// - /// This closure returns the bytes most recently received from the server, not including data from previous calls. - /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - /// also important to note that the server data in any `Response` object will be `nil`. - /// - /// - parameter closure: The code to be executed periodically during the lifecycle of the request. - /// - /// - returns: The request. - @discardableResult - open func stream(closure: ((Data) -> Void)? = nil) -> Self { - dataDelegate.dataStream = closure - return self - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - dataDelegate.progressHandler = (closure, queue) - return self - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. -open class DownloadRequest: Request { - - // MARK: Helper Types - - /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the - /// destination URL. - public struct DownloadOptions: OptionSet { - /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. - public let rawValue: UInt - - /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. - public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - - /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. - public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - - /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. - /// - /// - parameter rawValue: The raw bitmask value for the option. - /// - /// - returns: A new log level instance. - public init(rawValue: UInt) { - self.rawValue = rawValue - } - } - - /// A closure executed once a download request has successfully completed in order to determine where to move the - /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL - /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and - /// the options defining how the file should be moved. - public typealias DownloadFileDestination = ( - _ temporaryURL: URL, - _ response: HTTPURLResponse) - -> (destinationURL: URL, options: DownloadOptions) - - enum Downloadable: TaskConvertible { - case request(URLRequest) - case resumeData(Data) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .request(urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.downloadTask(with: urlRequest) } - case let .resumeData(resumeData): - task = queue.sync { session.downloadTask(withResumeData: resumeData) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { - return urlRequest - } - - return nil - } - - /// The resume data of the underlying download task if available after a failure. - open var resumeData: Data? { return downloadDelegate.resumeData } - - /// The progress of downloading the response data from the server for the request. - open var progress: Progress { return downloadDelegate.progress } - - var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } - - // MARK: State - - /// Cancels the request. - override open func cancel() { - cancel(createResumeData: true) - } - - /// Cancels the request. - /// - /// - parameter createResumeData: Determines whether resume data is created via the underlying download task or not. - open func cancel(createResumeData: Bool) { - if createResumeData { - downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } - } else { - downloadDelegate.downloadTask.cancel() - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task as Any] - ) - } - - // MARK: Progress - - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - downloadDelegate.progressHandler = (closure, queue) - return self - } - - // MARK: Destination - - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. - /// - /// - parameter directory: The search path directory. `.DocumentDirectory` by default. - /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. - /// - /// - returns: A download file destination closure. - open class func suggestedDownloadDestination( - for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) - - if !directoryURLs.isEmpty { - return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) - } - - return (temporaryURL, []) - } - } -} - -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. -open class UploadRequest: DataRequest { - - // MARK: Helper Types - - enum Uploadable: TaskConvertible { - case data(Data, URLRequest) - case file(URL, URLRequest) - case stream(InputStream, URLRequest) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask - - switch self { - case let .data(data, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, from: data) } - case let .file(url, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } - case let .stream(_, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } - } - - return task - } catch { - throw AdaptError(error: error) - } - } - } - - // MARK: Properties - - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - guard let uploadable = originalTask as? Uploadable else { return nil } - - switch uploadable { - case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): - return urlRequest - } - } - - /// The progress of uploading the payload to the server for the upload request. - open var uploadProgress: Progress { return uploadDelegate.uploadProgress } - - var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } - - // MARK: Upload Progress - - /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to - /// the server. - /// - /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress - /// of data being read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is sent to the server. - /// - /// - returns: The request. - @discardableResult - open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - uploadDelegate.uploadProgressHandler = (closure, queue) - return self - } -} - -// MARK: - - -#if !os(watchOS) - -/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -open class StreamRequest: Request { - enum Streamable: TaskConvertible { - case stream(hostName: String, port: Int) - case netService(NetService) - - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask - - switch self { - case let .stream(hostName, port): - task = queue.sync { session.streamTask(withHostName: hostName, port: port) } - case let .netService(netService): - task = queue.sync { session.streamTask(with: netService) } - } - - return task - } - } -} - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 747a471a55b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,567 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to store all data associated with an non-serialized response of a data or upload request. -public struct DefaultDataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDataResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - data: The data returned by the server. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.data = data - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a data or upload request. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter data: The data returned by the server. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DataResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.data = data - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data, the response serialization result and the timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DataResponse { - /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result - /// value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's - /// result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -/// Used to store all data associated with an non-serialized response of a download request. -public struct DefaultDownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDownloadResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - temporaryURL: The temporary destination URL of the data returned from the server. - /// - destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - resumeData: The resume data generated if the request was cancelled. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. - /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - parameter resumeData: The resume data generated if the request was cancelled. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DownloadResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.result = result - self.timeline = timeline - } -} - -// MARK: - - -extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the response serialization result and the - /// timeline. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") - output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") - output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") - } -} - -// MARK: - - -extension DownloadResponse { - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this - /// instance's result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -protocol Response { - /// The task metrics containing the request / response statistics. - var _metrics: AnyObject? { get set } - mutating func add(_ metrics: AnyObject?) -} - -extension Response { - mutating func add(_ metrics: AnyObject?) { - #if !os(watchOS) - guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } - guard let metrics = metrics as? URLSessionTaskMetrics else { return } - - _metrics = metrics - #endif - } -} - -// MARK: - - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 9cc105a8205..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,715 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The type in which all data response serializers must conform to in order to serialize a response. -public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DataResponseSerializer: DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - - -/// The type in which all download response serializers must conform to in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializerType`. - associatedtype SerializedObject - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } -} - -// MARK: - - -/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result - - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. - /// - /// - parameter serializeResponse: The closure used to serialize the response. - /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - Timeline - -extension Request { - var timeline: Timeline { - let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - return Timeline( - requestStartTime: requestStartTime, - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - } -} - -// MARK: - Default - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var dataResponse = DefaultDataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - error: self.delegate.error, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - completionHandler(dataResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - var dataResponse = DataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } - } - - return self - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var downloadResponse = DefaultDownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - error: self.downloadDelegate.error, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - completionHandler(downloadResponse) - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data contained in the destination url. - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.downloadDelegate.fileURL, - self.downloadDelegate.error - ) - - var downloadResponse = DownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - result: result, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } - } - - return self - } -} - -// MARK: - Data - -extension Request { - /// Returns a result data type that contains the response data as-is. - /// - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - return .success(validData) - } -} - -extension DataRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseData(response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseData(response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter completionHandler: The code to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) - } -} - -// MARK: - String - -extension Request { - /// Returns a result string type initialized from the response data with the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseString( - encoding: String.Encoding?, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName)) - ) - } - - let actualEncoding = convertedEncoding ?? .isoLatin1 - - if let string = String(data: validData, encoding: actualEncoding) { - return .success(string) - } else { - return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -// MARK: - JSON - -extension Request { - /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` - /// with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseJSON( - options: JSONSerialization.ReadingOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let json = try JSONSerialization.jsonObject(with: validData, options: options) - return .success(json) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -// MARK: - Property List - -extension Request { - /// Returns a plist object contained in a result type constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponsePropertyList( - options: PropertyListSerialization.ReadOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) - return .success(plist) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -extension DownloadRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -/// A set of HTTP response status code that do not contain response data. -private let emptyDataStatusCodes: Set = [204, 205] diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index e0928089ab7..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,300 +0,0 @@ -// -// Result.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to represent whether a request was successful or encountered an error. -/// -/// - success: The request and all post processing operations were successful resulting in the serialization of the -/// provided associated value. -/// -/// - failure: The request encountered an error resulting in a failure. The associated values are the original data -/// provided by the server as well as the error that caused the failure. -public enum Result { - case success(Value) - case failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .success: - return true - case .failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .success(let value): - return value - case .failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .success: - return nil - case .failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .success: - return "SUCCESS" - case .failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .success(let value): - return "SUCCESS: \(value)" - case .failure(let error): - return "FAILURE: \(error)" - } - } -} - -// MARK: - Functional APIs - -extension Result { - /// Creates a `Result` instance from the result of a closure. - /// - /// A failure result is created when the closure throws, and a success result is created when the closure - /// succeeds without throwing an error. - /// - /// func someString() throws -> String { ... } - /// - /// let result = Result(value: { - /// return try someString() - /// }) - /// - /// // The type of result is Result - /// - /// The trailing closure syntax is also supported: - /// - /// let result = Result { try someString() } - /// - /// - parameter value: The closure to execute and create the result for. - public init(value: () throws -> Value) { - do { - self = try .success(value()) - } catch { - self = .failure(error) - } - } - - /// Returns the success value, or throws the failure error. - /// - /// let possibleString: Result = .success("success") - /// try print(possibleString.unwrap()) - /// // Prints "success" - /// - /// let noString: Result = .failure(error) - /// try print(noString.unwrap()) - /// // Throws error - public func unwrap() throws -> Value { - switch self { - case .success(let value): - return value - case .failure(let error): - throw error - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: Result = .success(Data()) - /// let possibleInt = possibleData.map { $0.count } - /// try print(possibleInt.unwrap()) - /// // Prints "0" - /// - /// let noData: Result = .failure(error) - /// let noInt = noData.map { $0.count } - /// try print(noInt.unwrap()) - /// // Throws error - /// - /// - parameter transform: A closure that takes the success value of the `Result` instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func map(_ transform: (Value) -> T) -> Result { - switch self { - case .success(let value): - return .success(transform(value)) - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func flatMap(_ transform: (Value) throws -> T) -> Result { - switch self { - case .success(let value): - do { - return try .success(transform(value)) - } catch { - return .failure(error) - } - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: Result = .failure(someError) - /// let withMyError: Result = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func mapError(_ transform: (Error) -> T) -> Result { - switch self { - case .failure(let error): - return .failure(transform(error)) - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func flatMapError(_ transform: (Error) throws -> T) -> Result { - switch self { - case .failure(let error): - do { - return try .failure(transform(error)) - } catch { - return .failure(error) - } - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withValue(_ closure: (Value) throws -> Void) rethrows -> Result { - if case let .success(value) = self { try closure(value) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withError(_ closure: (Error) throws -> Void) rethrows -> Result { - if case let .failure(error) = self { try closure(error) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a success. - /// - /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifSuccess(_ closure: () throws -> Void) rethrows -> Result { - if isSuccess { try closure() } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure. - /// - /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifFailure(_ closure: () throws -> Void) rethrows -> Result { - if isFailure { try closure() } - - return self - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index dea099e257a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,307 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -open class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /// Initializes the `ServerTrustPolicyManager` instance with the given policies. - /// - /// Since different servers and web services can have different leaf certificates, intermediate and even root - /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - /// pinning for host3 and disabling evaluation for host4. - /// - /// - parameter policies: A dictionary of all policies mapped to a particular host. - /// - /// - returns: The new `ServerTrustPolicyManager` instance. - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /// Returns the `ServerTrustPolicy` for the given host if applicable. - /// - /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override - /// this method and implement more complex mapping implementations such as wildcards. - /// - /// - parameter host: The host to use when searching for a matching policy. - /// - /// - returns: The server trust policy for the given host if found. - open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension URLSession { - private struct AssociatedKeys { - static var managerKey = "URLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when -/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust -/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. -/// -/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other -/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged -/// to route all communication over an HTTPS connection with pinning enabled. -/// -/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to -/// validate the host provided by the challenge. Applications are encouraged to always -/// validate the host in production environments to guarantee the validity of the server's -/// certificate chain. -/// -/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to -/// validate the host provided by the challenge as well as specify the revocation flags for -/// testing for revoked certificates. Apple platforms did not start testing for revoked -/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is -/// demonstrated in our TLS tests. Applications are encouraged to always validate the host -/// in production environments to guarantee the validity of the server's certificate chain. -/// -/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is -/// considered valid if one of the pinned certificates match one of the server certificates. -/// By validating both the certificate chain and host, certificate pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered -/// valid if one of the pinned public keys match one of the server certificate public keys. -/// By validating both the certificate chain and host, public key pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. -public enum ServerTrustPolicy { - case performDefaultEvaluation(validateHost: Bool) - case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) - case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case disableEvaluation - case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) - - // MARK: - Bundle Location - - /// Returns all certificates within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `.cer` files. - /// - /// - returns: All certificates within the given bundle. - public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) - }.joined()) - - for path in paths { - if - let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, - let certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /// Returns all public keys within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `*.cer` files. - /// - /// - returns: All public keys within the given bundle. - public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificates(in: bundle) { - if let publicKey = publicKey(for: certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /// Evaluates whether the server trust is valid for the given host. - /// - /// - parameter serverTrust: The server trust to evaluate. - /// - parameter host: The host of the challenge protection space. - /// - /// - returns: Whether the server trust is valid. - public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .performDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .performRevokedEvaluation(validateHost, revocationFlags): - let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) - SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateData(for: serverTrust) - let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData == pinnedCertificateData { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .disableEvaluation: - serverTrustIsValid = true - case let .customEvaluation(closure): - serverTrustIsValid = closure(serverTrust, host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(_ trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType.invalid - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType.unspecified - let proceed = SecTrustResultType.proceed - - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateData(for trust: SecTrust) -> [Data] { - var certificates: [SecCertificate] = [] - - for index in 0.. [Data] { - return certificates.map { SecCertificateCopyData($0) as Data } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeys(for trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust, trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift deleted file mode 100644 index 4964f1eebfd..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ /dev/null @@ -1,725 +0,0 @@ -// -// SessionDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for handling all delegate callbacks for the underlying session. -open class SessionDelegate: NSObject { - - // MARK: URLSessionDelegate Overrides - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. - open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. - open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. - open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? - - // MARK: URLSessionTaskDelegate Overrides - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. - open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. - open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. - open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and - /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. - open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. - open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? - - // MARK: URLSessionDataDelegate Overrides - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. - open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. - open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. - open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. - open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? - - // MARK: URLSessionDownloadDelegate Overrides - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. - open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. - open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. - open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: URLSessionStreamDelegate Overrides - -#if !os(watchOS) - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - -#endif - - // MARK: Properties - - var retrier: RequestRetrier? - weak var sessionManager: SessionManager? - - var requests: [Int: Request] = [:] - private let lock = NSLock() - - /// Access the task delegate for the specified task in a thread-safe manner. - open subscript(task: URLSessionTask) -> Request? { - get { - lock.lock() ; defer { lock.unlock() } - return requests[task.taskIdentifier] - } - set { - lock.lock() ; defer { lock.unlock() } - requests[task.taskIdentifier] = newValue - } - } - - // MARK: Lifecycle - - /// Initializes the `SessionDelegate` instance. - /// - /// - returns: The new `SessionDelegate` instance. - public override init() { - super.init() - } - - // MARK: NSObject Overrides - - /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond - /// to a specified message. - /// - /// - parameter selector: A selector that identifies a message. - /// - /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. - open override func responds(to selector: Selector) -> Bool { - #if !os(macOS) - if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil - } - #endif - - #if !os(watchOS) - if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { - switch selector { - case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): - return streamTaskReadClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): - return streamTaskWriteClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): - return streamTaskBetterRouteDiscovered != nil - case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): - return streamTaskDidBecomeInputAndOutputStreams != nil - default: - break - } - } - #endif - - switch selector { - case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return type(of: self).instancesRespond(to: selector) - } - } -} - -// MARK: - URLSessionDelegate - -extension SessionDelegate: URLSessionDelegate { - /// Tells the delegate that the session has been invalidated. - /// - /// - parameter session: The session object that was invalidated. - /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /// Requests credentials from the delegate in response to a session-level authentication request from the - /// remote server. - /// - /// - parameter session: The session containing the task that requested authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return - } - - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - -#if !os(macOS) - - /// Tells the delegate that all messages enqueued for a session have been delivered. - /// - /// - parameter session: The session that no longer has any outstanding requests. - open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - -#endif -} - -// MARK: - URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Tells the delegate that the remote server requested an HTTP redirect. - /// - /// - parameter session: The session containing the task whose request resulted in a redirect. - /// - parameter task: The task whose request resulted in a redirect. - /// - parameter response: An object containing the server’s response to the original request. - /// - parameter request: A URL request object filled out with the new location. - /// - parameter completionHandler: A closure that your handler should call with either the value of the request - /// parameter, a modified URL request object, or NULL to refuse the redirect and - /// return the body of the redirect response. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /// Requests credentials from the delegate in response to an authentication request from the remote server. - /// - /// - parameter session: The session containing the task whose request requires authentication. - /// - parameter task: The task whose request requires authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task]?.delegate { - delegate.urlSession( - session, - task: task, - didReceive: challenge, - completionHandler: completionHandler - ) - } else { - urlSession(session, didReceive: challenge, completionHandler: completionHandler) - } - } - - /// Tells the delegate when a task requires a new request body stream to send to the remote server. - /// - /// - parameter session: The session containing the task that needs a new body stream. - /// - parameter task: The task that needs a new body stream. - /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task]?.delegate { - delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /// Periodically informs the delegate of the progress of sending body content to the server. - /// - /// - parameter session: The session containing the data task. - /// - parameter task: The data task. - /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - /// - parameter totalBytesSent: The total number of bytes sent so far. - /// - parameter totalBytesExpectedToSend: The expected length of the body data. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - -#if !os(watchOS) - - /// Tells the delegate that the session finished collecting metrics for the task. - /// - /// - parameter session: The session collecting the metrics. - /// - parameter task: The task whose metrics have been collected. - /// - parameter metrics: The collected metrics. - @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) - @objc(URLSession:task:didFinishCollectingMetrics:) - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - self[task]?.delegate.metrics = metrics - } - -#endif - - /// Tells the delegate that the task finished transferring data. - /// - /// - parameter session: The session containing the task whose request finished transferring data. - /// - parameter task: The task whose request finished transferring data. - /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - /// Executed after it is determined that the request is not going to be retried - let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in - guard let strongSelf = self else { return } - - strongSelf.taskDidComplete?(session, task, error) - - strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) - - var userInfo: [String: Any] = [Notification.Key.Task: task] - - if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data { - userInfo[Notification.Key.ResponseData] = data - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidComplete, - object: strongSelf, - userInfo: userInfo - ) - - strongSelf[task] = nil - } - - guard let request = self[task], let sessionManager = sessionManager else { - completeTask(session, task, error) - return - } - - // Run all validations on the request before checking if an error occurred - request.validations.forEach { $0() } - - // Determine whether an error has occurred - var error: Error? = error - - if request.delegate.error != nil { - error = request.delegate.error - } - - /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request - /// should be retried. Otherwise, complete the task by notifying the task delegate. - if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in - guard shouldRetry else { completeTask(session, task, error) ; return } - - DispatchQueue.utility.after(timeDelay) { [weak self] in - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false - - if retrySucceeded, let task = request.task { - strongSelf[task] = request - return - } else { - completeTask(session, task, error) - } - } - } - } else { - completeTask(session, task, error) - } - } -} - -// MARK: - URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - /// Tells the delegate that the data task received the initial reply (headers) from the server. - /// - /// - parameter session: The session containing the data task that received an initial reply. - /// - parameter dataTask: The data task that received an initial reply. - /// - parameter response: A URL response object populated with headers. - /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - /// constant to indicate whether the transfer should continue as a data task or - /// should become a download task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } - - var disposition: URLSession.ResponseDisposition = .allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /// Tells the delegate that the data task was changed to a download task. - /// - /// - parameter session: The session containing the task that was replaced by a download task. - /// - parameter dataTask: The data task that was replaced by a download task. - /// - parameter downloadTask: The new download task that replaced the data task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) - } - } - - /// Tells the delegate that the data task has received some of the expected data. - /// - /// - parameter session: The session containing the data task that provided data. - /// - parameter dataTask: The data task that provided data. - /// - parameter data: A data object containing the transferred data. - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession(session, dataTask: dataTask, didReceive: data) - } - } - - /// Asks the delegate whether the data (or upload) task should store the response in the cache. - /// - /// - parameter session: The session containing the data (or upload) task. - /// - parameter dataTask: The data (or upload) task. - /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - /// caching policy and the values of certain received headers, such as the Pragma - /// and Cache-Control headers. - /// - parameter completionHandler: A block that your handler must call, providing either the original proposed - /// response, a modified version of that response, or NULL to prevent caching the - /// response. If your delegate implements this method, it must call this completion - /// handler; otherwise, your app leaks memory. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return - } - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } -} - -// MARK: - URLSessionDownloadDelegate - -extension SessionDelegate: URLSessionDownloadDelegate { - /// Tells the delegate that a download task has finished downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that finished. - /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - /// open the file for reading or move it to a permanent location in your app’s sandbox - /// container directory before returning from this delegate method. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - } - } - - /// Periodically informs the delegate about the download’s progress. - /// - /// - parameter session: The session containing the download task. - /// - parameter downloadTask: The download task. - /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate - /// method was called. - /// - parameter totalBytesWritten: The total number of bytes transferred so far. - /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - /// header. If this header was not provided, the value is - /// `NSURLSessionTransferSizeUnknown`. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /// Tells the delegate that the download task has resumed downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. - /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - /// existing content, then this value is zero. Otherwise, this value is an - /// integer representing the number of bytes on disk that do not need to be - /// retrieved again. - /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } -} - -// MARK: - URLSessionStreamDelegate - -#if !os(watchOS) - -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -extension SessionDelegate: URLSessionStreamDelegate { - /// Tells the delegate that the read side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /// Tells the delegate that the write side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /// Tells the delegate that the system has determined that a better route to the host is available. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - /// - parameter inputStream: The new input stream. - /// - parameter outputStream: The new output stream. - open func urlSession( - _ session: URLSession, - streamTask: URLSessionStreamTask, - didBecome inputStream: InputStream, - outputStream: OutputStream) - { - streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift deleted file mode 100644 index 02c36a76b7b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ /dev/null @@ -1,899 +0,0 @@ -// -// SessionManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -open class SessionManager { - - // MARK: - Helper Types - - /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - /// associated values. - /// - /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with - /// streaming information. - /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - /// error. - public enum MultipartFormDataEncodingResult { - case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) - case failure(Error) - } - - // MARK: - Properties - - /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use - /// directly for any ad hoc requests. - public static let `default`: SessionManager = { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders - - return SessionManager(configuration: configuration) - }() - - /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - public static let defaultHTTPHeaders: HTTPHeaders = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joined(separator: ", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` - let userAgent: String = { - if let info = Bundle.main.infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let version = ProcessInfo.processInfo.operatingSystemVersion - let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(macOS) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion: String = { - guard - let afInfo = Bundle(for: SessionManager.self).infoDictionary, - let build = afInfo["CFBundleShortVersionString"] - else { return "Unknown" } - - return "Alamofire/\(build)" - }() - - return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - /// Default memory threshold used when encoding `MultipartFormData` in bytes. - public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 - - /// The underlying session. - public let session: URLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - open var startRequestsImmediately: Bool = true - - /// The request adapter called each time a new request is created. - open var adapter: RequestAdapter? - - /// The request retrier called each time a request encounters an error to determine whether to retry the request. - open var retrier: RequestRetrier? { - get { return delegate.retrier } - set { delegate.retrier = newValue } - } - - /// The background completion handler closure provided by the UIApplicationDelegate - /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - /// will automatically call the handler. - /// - /// If you need to handle your own events before the handler is called, then you need to override the - /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - /// - /// `nil` by default. - open var backgroundCompletionHandler: (() -> Void)? - - let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) - - // MARK: - Lifecycle - - /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter configuration: The configuration used to construct the managed session. - /// `URLSessionConfiguration.default` by default. - /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - /// default. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance. - public init( - configuration: URLSessionConfiguration = URLSessionConfiguration.default, - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter session: The URL session. - /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. - public init?( - session: URLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionManager = self - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Data Request - - /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` - /// and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest - { - var originalRequest: URLRequest? - - do { - originalRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) - return request(encodedURLRequest) - } catch { - return request(originalRequest, failedWith: error) - } - } - - /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - var originalRequest: URLRequest? - - do { - originalRequest = try urlRequest.asURLRequest() - let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) - - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - let request = DataRequest(session: session, requestTask: .data(originalTask, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return request(originalRequest, failedWith: error) - } - } - - // MARK: Private - Request Implementation - - private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { - var requestTask: Request.RequestTask = .data(nil, nil) - - if let urlRequest = urlRequest { - let originalTask = DataRequest.Requestable(urlRequest: urlRequest) - requestTask = .data(originalTask, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: request, with: underlyingError) - } else { - if startRequestsImmediately { request.resume() } - } - - return request - } - - // MARK: - Download Request - - // MARK: URL Request - - /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, - /// `headers` and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) - return download(encodedURLRequest, to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save - /// them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try urlRequest.asURLRequest() - return download(.request(urlRequest), to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - // MARK: Resume Data - - /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve - /// the contents of the original request and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken - /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the - /// data is written incorrectly and will always fail to resume the download. For more information about the bug and - /// possible workarounds, please refer to the following Stack Overflow post: - /// - /// - http://stackoverflow.com/a/39347461/1342462 - /// - /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` - /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for - /// additional information. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - return download(.resumeData(resumeData), to: destination) - } - - // MARK: Private - Download Implementation - - private func download( - _ downloadable: DownloadRequest.Downloadable, - to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { - do { - let task = try downloadable.task(session: session, adapter: adapter, queue: queue) - let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) - - download.downloadDelegate.destination = destination - - delegate[task] = download - - if startRequestsImmediately { download.resume() } - - return download - } catch { - return download(downloadable, to: destination, failedWith: error) - } - } - - private func download( - _ downloadable: DownloadRequest.Downloadable?, - to destination: DownloadRequest.DownloadFileDestination?, - failedWith error: Error) - -> DownloadRequest - { - var downloadTask: Request.RequestTask = .download(nil, nil) - - if let downloadable = downloadable { - downloadTask = .download(downloadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - - let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) - download.downloadDelegate.destination = destination - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: download, with: underlyingError) - } else { - if startRequestsImmediately { download.resume() } - } - - return download - } - - // MARK: - Upload Request - - // MARK: File - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(fileURL, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.file(fileURL, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: Data - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(data, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.data(data, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(stream, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.stream(stream, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: MultipartFormData - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `url`, `method` and `headers`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - - return upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - queue: queue, - encodingCompletion: encodingCompletion - ) - } catch { - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `urlRequest`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter urlRequest: The URL request. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - DispatchQueue.global(qos: .utility).async { - let formData = MultipartFormData() - multipartFormData(formData) - - var tempFileURL: URL? - - do { - var urlRequestWithContentType = try urlRequest.asURLRequest() - urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - let data = try formData.encode() - - let encodingResult = MultipartFormDataEncodingResult.success( - request: self.upload(data, with: urlRequestWithContentType), - streamingFromDisk: false, - streamFileURL: nil - ) - - (queue ?? DispatchQueue.main).async { encodingCompletion?(encodingResult) } - } else { - let fileManager = FileManager.default - let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") - let fileName = UUID().uuidString - let fileURL = directoryURL.appendingPathComponent(fileName) - - tempFileURL = fileURL - - var directoryError: Error? - - // Create directory inside serial queue to ensure two threads don't do this in parallel - self.queue.sync { - do { - try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) - } catch { - directoryError = error - } - } - - if let directoryError = directoryError { throw directoryError } - - try formData.writeEncodedData(to: fileURL) - - let upload = self.upload(fileURL, with: urlRequestWithContentType) - - // Cleanup the temp file once the upload is complete - upload.delegate.queue.addOperation { - do { - try FileManager.default.removeItem(at: fileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { - let encodingResult = MultipartFormDataEncodingResult.success( - request: upload, - streamingFromDisk: true, - streamFileURL: fileURL - ) - - encodingCompletion?(encodingResult) - } - } - } catch { - // Cleanup the temp file in the event that the multipart form data encoding failed - if let tempFileURL = tempFileURL { - do { - try FileManager.default.removeItem(at: tempFileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - } - - // MARK: Private - Upload Implementation - - private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { - do { - let task = try uploadable.task(session: session, adapter: adapter, queue: queue) - let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) - - if case let .stream(inputStream, _) = uploadable { - upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } - } - - delegate[task] = upload - - if startRequestsImmediately { upload.resume() } - - return upload - } catch { - return upload(uploadable, failedWith: error) - } - } - - private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { - var uploadTask: Request.RequestTask = .upload(nil, nil) - - if let uploadable = uploadable { - uploadTask = .upload(uploadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: upload, with: underlyingError) - } else { - if startRequestsImmediately { upload.resume() } - } - - return upload - } - -#if !os(watchOS) - - // MARK: - Stream Request - - // MARK: Hostname and Port - - /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter hostName: The hostname of the server to connect to. - /// - parameter port: The port of the server to connect to. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return stream(.stream(hostName: hostName, port: port)) - } - - // MARK: NetService - - /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter netService: The net service used to identify the endpoint. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(with netService: NetService) -> StreamRequest { - return stream(.netService(netService)) - } - - // MARK: Private - Stream Implementation - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { - do { - let task = try streamable.task(session: session, adapter: adapter, queue: queue) - let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return stream(failedWith: error) - } - } - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(failedWith error: Error) -> StreamRequest { - let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) - if startRequestsImmediately { stream.resume() } - return stream - } - -#endif - - // MARK: - Internal - Retry Request - - func retry(_ request: Request) -> Bool { - guard let originalTask = request.originalTask else { return false } - - do { - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - - if let originalTask = request.task { - delegate[originalTask] = nil // removes the old request to avoid endless growth - } - - request.delegate.task = task // resets all task delegate data - - request.retryCount += 1 - request.startTime = CFAbsoluteTimeGetCurrent() - request.endTime = nil - - task.resume() - - return true - } catch { - request.delegate.error = error.underlyingAdaptError ?? error - return false - } - } - - private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { - DispatchQueue.utility.async { [weak self] in - guard let strongSelf = self else { return } - - retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in - guard let strongSelf = self else { return } - - guard shouldRetry else { - if strongSelf.startRequestsImmediately { request.resume() } - return - } - - DispatchQueue.utility.after(timeDelay) { - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.retry(request) - - if retrySucceeded, let task = request.task { - strongSelf.delegate[task] = request - } else { - if strongSelf.startRequestsImmediately { request.resume() } - } - } - } - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift deleted file mode 100644 index 5705737e49d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ /dev/null @@ -1,466 +0,0 @@ -// -// TaskDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as -/// executing all operations attached to the serial operation queue upon task completion. -open class TaskDelegate: NSObject { - - // MARK: Properties - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: OperationQueue - - /// The data returned by the server. - public var data: Data? { return nil } - - /// The error generated throughout the lifecyle of the task. - public var error: Error? - - var task: URLSessionTask? { - set { - taskLock.lock(); defer { taskLock.unlock() } - _task = newValue - } - get { - taskLock.lock(); defer { taskLock.unlock() } - return _task - } - } - - var initialResponseTime: CFAbsoluteTime? - var credential: URLCredential? - var metrics: AnyObject? // URLSessionTaskMetrics - - private var _task: URLSessionTask? { - didSet { reset() } - } - - private let taskLock = NSLock() - - // MARK: Lifecycle - - init(task: URLSessionTask?) { - _task = task - - self.queue = { - let operationQueue = OperationQueue() - - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.isSuspended = true - operationQueue.qualityOfService = .utility - - return operationQueue - }() - } - - func reset() { - error = nil - initialResponseTime = nil - } - - // MARK: URLSessionTaskDelegate - - var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? - - @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - @objc(URLSession:task:didReceiveChallenge:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } - - @objc(URLSession:task:needNewBodyStream:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - var bodyStream: InputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - @objc(URLSession:task:didCompleteWithError:) - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - if self.error == nil { self.error = error } - - if - let downloadDelegate = self as? DownloadTaskDelegate, - let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data - { - downloadDelegate.resumeData = resumeData - } - } - - queue.isSuspended = false - } - } -} - -// MARK: - - -class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { - - // MARK: Properties - - var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } - - override var data: Data? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var dataStream: ((_ data: Data) -> Void)? - - private var totalBytesReceived: Int64 = 0 - private var mutableData: Data - - private var expectedContentLength: Int64? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - mutableData = Data() - progress = Progress(totalUnitCount: 0) - - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - totalBytesReceived = 0 - mutableData = Data() - expectedContentLength = nil - } - - // MARK: URLSessionDataDelegate - - var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - var disposition: URLSession.ResponseDisposition = .allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data) - } else { - mutableData.append(data) - } - - let bytesReceived = Int64(data.count) - totalBytesReceived += bytesReceived - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - var cachedResponse: CachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } -} - -// MARK: - - -class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { - - // MARK: Properties - - var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var resumeData: Data? - override var data: Data? { return resumeData } - - var destination: DownloadRequest.DownloadFileDestination? - - var temporaryURL: URL? - var destinationURL: URL? - - var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - progress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - resumeData = nil - } - - // MARK: URLSessionDownloadDelegate - - var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? - var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - temporaryURL = location - - guard - let destination = destination, - let response = downloadTask.response as? HTTPURLResponse - else { return } - - let result = destination(location, response) - let destinationURL = result.destinationURL - let options = result.options - - self.destinationURL = destinationURL - - do { - if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { - try FileManager.default.removeItem(at: destinationURL) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destinationURL.deletingLastPathComponent() - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try FileManager.default.moveItem(at: location, to: destinationURL) - } catch { - self.error = error - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } -} - -// MARK: - - -class UploadTaskDelegate: DataTaskDelegate { - - // MARK: Properties - - var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } - - var uploadProgress: Progress - var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - uploadProgress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - uploadProgress = Progress(totalUnitCount: 0) - } - - // MARK: URLSessionTaskDelegate - - var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - func URLSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - if let uploadProgressHandler = uploadProgressHandler { - uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } - } - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift deleted file mode 100644 index 596c1bdc41f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Timeline.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. -public struct Timeline { - /// The time the request was initialized. - public let requestStartTime: CFAbsoluteTime - - /// The time the first bytes were received from or sent to the server. - public let initialResponseTime: CFAbsoluteTime - - /// The time when the request was completed. - public let requestCompletedTime: CFAbsoluteTime - - /// The time when the response serialization was completed. - public let serializationCompletedTime: CFAbsoluteTime - - /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: TimeInterval - - /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: TimeInterval - - /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: TimeInterval - - /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: TimeInterval - - /// Creates a new `Timeline` instance with the specified request times. - /// - /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - /// Defaults to `0.0`. - /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - /// to `0.0`. - /// - /// - returns: The new `Timeline` instance. - public init( - requestStartTime: CFAbsoluteTime = 0.0, - initialResponseTime: CFAbsoluteTime = 0.0, - requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { - self.requestStartTime = requestStartTime - self.initialResponseTime = initialResponseTime - self.requestCompletedTime = requestCompletedTime - self.serializationCompletedTime = serializationCompletedTime - - self.latency = initialResponseTime - requestStartTime - self.requestDuration = requestCompletedTime - requestStartTime - self.serializationDuration = serializationCompletedTime - requestCompletedTime - self.totalDuration = serializationCompletedTime - requestStartTime - } -} - -// MARK: - CustomStringConvertible - -extension Timeline: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the latency, the request - /// duration and the total duration. - public var description: String { - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} - -// MARK: - CustomDebugStringConvertible - -extension Timeline: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes the request start time, the - /// initial response time, the request completed time, the serialization completed time, the latency, the request - /// duration and the total duration. - public var debugDescription: String { - let requestStartTime = String(format: "%.3f", self.requestStartTime) - let initialResponseTime = String(format: "%.3f", self.initialResponseTime) - let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) - let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Request Start Time\": " + requestStartTime, - "\"Initial Response Time\": " + initialResponseTime, - "\"Request Completed Time\": " + requestCompletedTime, - "\"Serialization Completed Time\": " + serializationCompletedTime, - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index 59e0bbb2b0e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,321 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - - // MARK: Helper Types - - fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - /// Used to represent whether validation was successful or encountered an error resulting in a failure. - /// - /// - success: The validation was successful. - /// - failure: The validation failed encountering the provided error. - public enum ValidationResult { - case success - case failure(Error) - } - - fileprivate struct MIMEType { - let type: String - let subtype: String - - var isWildcard: Bool { return type == "*" && subtype == "*" } - - init?(_ string: String) { - let components: [String] = { - let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - - #if swift(>=3.2) - let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - #else - let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) - #endif - - return split.components(separatedBy: "/") - }() - - if let type = components.first, let subtype = components.last { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(_ mime: MIMEType) -> Bool { - switch (type, subtype) { - case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - // MARK: Properties - - fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } - - fileprivate var acceptableContentTypes: [String] { - if let accept = request?.value(forHTTPHeaderField: "Accept") { - return accept.components(separatedBy: ",") - } - - return ["*/*"] - } - - // MARK: Status Code - - fileprivate func validate( - statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == Int - { - if acceptableStatusCodes.contains(response.statusCode) { - return .success - } else { - let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) - return .failure(AFError.responseValidationFailed(reason: reason)) - } - } - - // MARK: Content Type - - fileprivate func validate( - contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) - -> ValidationResult - where S.Iterator.Element == String - { - guard let data = data, data.count > 0 else { return .success } - - guard - let responseContentType = response.mimeType, - let responseMIMEType = MIMEType(responseContentType) - else { - for contentType in acceptableContentTypes { - if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } - - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success - } - } - - let error: AFError = { - let reason: ErrorReason = .unacceptableContentType( - acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType - ) - - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } -} - -// MARK: - - -extension DataRequest { - /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the - /// request was valid. - public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(self.request, response, self.delegate.data) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, data in - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -// MARK: - - -extension DownloadRequest { - /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a - /// destination URL, and returns whether the request was valid. - public typealias Validation = ( - _ request: URLRequest?, - _ response: HTTPURLResponse, - _ temporaryURL: URL?, - _ destinationURL: URL?) - -> ValidationResult - - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - let request = self.request - let temporaryURL = self.downloadDelegate.temporaryURL - let destinationURL = self.downloadDelegate.destinationURL - - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(request, response, temporaryURL, destinationURL) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, _, _ in - let fileURL = self.downloadDelegate.fileURL - - guard let validFileURL = fileURL else { - return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) - } - - do { - let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes, response: response, data: data) - } catch { - return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) - } - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json deleted file mode 100644 index 2d9c418f908..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "PetstoreClient", - "platforms": { - "ios": "9.0", - "osx": "10.11", - "tvos": "9.0" - }, - "version": "1.0.0", - "source": { - "git": "git@github.com:OpenAPITools/openapi-generator.git", - "tag": "v1.0.0" - }, - "authors": "", - "license": "Proprietary", - "homepage": "https://github.com/openapitools/openapi-generator", - "summary": "PetstoreClient", - "source_files": "PetstoreClient/Classes/**/*.swift", - "dependencies": { - "RxSwift": [ - "~> 4.0" - ], - "Alamofire": [ - "~> 4.9.0" - ] - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Manifest.lock deleted file mode 100644 index 83d09b4381d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Manifest.lock +++ /dev/null @@ -1,27 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - - RxSwift (~> 4.0) - - RxSwift (4.5.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - Alamofire - - RxSwift - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: 432f1430feb6f893260645040aa967411fea06d9 - RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 - -PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d - -COCOAPODS: 1.6.1 diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 447a87c0942..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,63 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? Array { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? Array { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index bb2f200ba3a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,61 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - open static var basePath = "http://petstore.swagger.io:80/v2" - open static var credential: URLCredential? - open static var customHeaders: [String: String] = [:] - open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 2fadeb51ceb..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter client: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testSpecialTags(client: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testSpecialTagsWithRequestBuilder(client: client).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test special tags - - - parameter client: (body) client model - - returns: Observable - */ - open class func testSpecialTags(client: Client) -> Observable { - return Observable.create { observer -> Disposable in - testSpecialTags(client: client) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags - - examples: [{contentType=application/json, example={ - "client" : "client" -}}] - - parameter client: (body) client model - - returns: RequestBuilder - */ - open class func testSpecialTagsWithRequestBuilder(client: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: client) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 404824a2c73..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,712 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - - parameter body: (body) Input boolean as post body (optional) - - returns: Observable - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterBooleanSerialize(body: body) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - examples: [{contentType=*/*, example=null}] - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter outerComposite: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterCompositeSerialize(outerComposite: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(outerComposite: outerComposite).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - - parameter outerComposite: (body) Input composite as post body (optional) - - returns: Observable - */ - open class func fakeOuterCompositeSerialize(outerComposite: OuterComposite? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterCompositeSerialize(outerComposite: outerComposite) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - examples: [{contentType=*/*, example= { }}] - - parameter outerComposite: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(outerComposite: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: outerComposite) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - - parameter body: (body) Input number as post body (optional) - - returns: Observable - */ - open class func fakeOuterNumberSerialize(body: Double? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterNumberSerialize(body: body) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - examples: [{contentType=*/*, example=null}] - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - - parameter body: (body) Input string as post body (optional) - - returns: Observable - */ - open class func fakeOuterStringSerialize(body: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterStringSerialize(body: body) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - examples: [{contentType=*/*, example=null}] - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter user: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithQueryParams(query: String, user: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, user: user).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - - parameter query: (query) - - parameter user: (body) - - returns: Observable - */ - open class func testBodyWithQueryParams(query: String, user: User) -> Observable { - return Observable.create { observer -> Disposable in - testBodyWithQueryParams(query: query, user: user) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter user: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, user: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: user) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter client: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClientModel(client: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(client: client).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test \"client\" model - - - parameter client: (body) client model - - returns: Observable - */ - open class func testClientModel(client: Client) -> Observable { - return Observable.create { observer -> Disposable in - testClientModel(client: client) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - examples: [{contentType=application/json, example={ - "client" : "client" -}}] - - parameter client: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(client: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: client) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: Observable - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number, - "float": float, - "double": double, - "string": string, - "pattern_without_delimiter": patternWithoutDelimiter, - "byte": byte, - "binary": binary, - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password, - "callback": callback - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to "$") - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to "-efg") - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to "$") - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to "-efg") - - returns: Observable - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable { - return Observable.create { observer -> Disposable in - testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to "-efg") - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to "$") - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to "-efg") - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray, - "enum_form_string": enumFormString?.rawValue - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray, - "enum_query_string": enumQueryString?.rawValue, - "enum_query_integer": enumQueryInteger?.rawValue, - "enum_query_double": enumQueryDouble?.rawValue - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray, - "enum_header_string": enumHeaderString?.rawValue - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter requestBody: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testInlineAdditionalProperties(requestBody: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(requestBody: requestBody).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test inline additionalProperties - - - parameter requestBody: (body) request body - - returns: Observable - */ - open class func testInlineAdditionalProperties(requestBody: [String: String]) -> Observable { - return Observable.create { observer -> Disposable in - testInlineAdditionalProperties(requestBody: requestBody) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter requestBody: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(requestBody: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: requestBody) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: Observable - */ - open class func testJsonFormData(param: String, param2: String) -> Observable { - return Observable.create { observer -> Disposable in - testJsonFormData(param: param, param2: param2) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param, - "param2": param2 - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index b14e41a990c..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter client: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClassname(client: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(client: client).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test class name in snake case - - - parameter client: (body) client model - - returns: Observable - */ - open class func testClassname(client: Client) -> Observable { - return Observable.create { observer -> Disposable in - testClassname(client: client) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - examples: [{contentType=application/json, example={ - "client" : "client" -}}] - - parameter client: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(client: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: client) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 5bfe5c64b2e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,597 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class PetAPI { - /** - Add a new pet to the store - - - parameter pet: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addPet(pet: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Add a new pet to the store - - - parameter pet: (body) Pet object that needs to be added to the store - - returns: Observable - */ - open class func addPet(pet: Pet) -> Observable { - return Observable.create { observer -> Disposable in - addPet(pet: pet) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter pet: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(pet: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: pet) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: Observable - */ - open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - deletePet(petId: petId, apiKey: apiKey) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - returns: Observable<[Pet]> - */ - open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> { - return Observable.create { observer -> Disposable in - findPetsByStatus(status: status) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}}, {contentType=application/xml, example= - 123456789 - doggie - - aeiou - - - - aeiou -}] - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - returns: Observable<[Pet]> - */ - open class func findPetsByTags(tags: [String]) -> Observable<[Pet]> { - return Observable.create { observer -> Disposable in - findPetsByTags(tags: tags) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}}, {contentType=application/xml, example= - 123456789 - doggie - - aeiou - - - - aeiou -}] - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - returns: Observable - */ - open class func getPetById(petId: Int64) -> Observable { - return Observable.create { observer -> Disposable in - getPetById(petId: petId) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}}, {contentType=application/xml, example= - 123456789 - doggie - - aeiou - - - - aeiou -}] - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter pet: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePet(pet: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Update an existing pet - - - parameter pet: (body) Pet object that needs to be added to the store - - returns: Observable - */ - open class func updatePet(pet: Pet) -> Observable { - return Observable.create { observer -> Disposable in - updatePet(pet: pet) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter pet: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(pet: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: pet) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: Observable - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - updatePetWithForm(petId: petId, name: name, status: status) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name, - "status": status - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: Observable - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable { - return Observable.create { observer -> Disposable in - uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - examples: [{contentType=application/json, example={ - "code" : 0, - "type" : "type", - "message" : "message" -}}] - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index 4fb14bc42d0..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,256 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: Observable - */ - open class func deleteOrder(orderId: String) -> Observable { - return Observable.create { observer -> Disposable in - deleteOrder(orderId: orderId) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(orderId)" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Returns pet inventories by status - - - returns: Observable<[String:Int]> - */ - open class func getInventory() -> Observable<[String: Int]> { - return Observable.create { observer -> Disposable in - getInventory { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: Observable - */ - open class func getOrderById(orderId: Int64) -> Observable { - return Observable.create { observer -> Disposable in - getOrderById(orderId: orderId) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}}, {contentType=application/xml, example= - 123456789 - 123456789 - 123 - 2000-01-23T04:56:07.000Z - aeiou - true -}] - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(orderId)" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter order: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - open class func placeOrder(order: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(order: order).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Place an order for a pet - - - parameter order: (body) order placed for purchasing the pet - - returns: Observable - */ - open class func placeOrder(order: Order) -> Observable { - return Observable.create { observer -> Disposable in - placeOrder(order: order) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Place an order for a pet - - POST /store/order - - examples: [{contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}}, {contentType=application/xml, example= - 123456789 - 123456789 - 123 - 2000-01-23T04:56:07.000Z - aeiou - true -}] - - parameter order: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(order: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: order) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index 9f5e670bfc2..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,476 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire -import RxSwift - -open class UserAPI { - /** - Create user - - - parameter user: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUser(user: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(user: user).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Create user - - - parameter user: (body) Created user object - - returns: Observable - */ - open class func createUser(user: User) -> Observable { - return Observable.create { observer -> Disposable in - createUser(user: user) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter user: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(user: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: user) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter user: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithArrayInput(user: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(user: user).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - - parameter user: (body) List of user object - - returns: Observable - */ - open class func createUsersWithArrayInput(user: [User]) -> Observable { - return Observable.create { observer -> Disposable in - createUsersWithArrayInput(user: user) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter user: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(user: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: user) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter user: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithListInput(user: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(user: user).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - - parameter user: (body) List of user object - - returns: Observable - */ - open class func createUsersWithListInput(user: [User]) -> Observable { - return Observable.create { observer -> Disposable in - createUsersWithListInput(user: user) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter user: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(user: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: user) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - returns: Observable - */ - open class func deleteUser(username: String) -> Observable { - return Observable.create { observer -> Disposable in - deleteUser(username: username) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(username)" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: Observable - */ - open class func getUserByName(username: String) -> Observable { - return Observable.create { observer -> Disposable in - getUserByName(username: username) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Get user by user name - - GET /user/{username} - - examples: [{contentType=application/json, example={ - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" -}}, {contentType=application/xml, example= - 123456789 - aeiou - aeiou - aeiou - aeiou - aeiou - aeiou - 123 -}] - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(username)" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: Observable - */ - open class func loginUser(username: String, password: String) -> Observable { - return Observable.create { observer -> Disposable in - loginUser(username: username, password: password) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username, - "password": password - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Logs out current logged in user session - - - returns: Observable - */ - open class func logoutUser() -> Observable { - return Observable.create { observer -> Disposable in - logoutUser { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter user: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updateUser(username: String, user: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, user: user).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter user: (body) Updated user object - - returns: Observable - */ - open class func updateUser(username: String, user: User) -> Observable { - return Observable.create { observer -> Disposable in - updateUser(username: username, user: user) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter user: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, user: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(username)" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: user) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 8fc48ccbedb..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,412 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -// Store manager to retain its reference -private var managerStore: [String: Alamofire.SessionManager] = [:] - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - _ = managerStore.removeValue(forKey: managerId) - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - _ = managerStore.removeValue(forKey: managerId) - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27e6a287619..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - open static var dateformatter: DateFormatter? - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" - decoder.dateDecodingStrategy = .formatted(formatter) - } - - do { - returnedDecodable = try decoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" - encoder.dateEncodingStrategy = .formatted(formatter) - - do { - returnedData = try encoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index eb61a73c0b7..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 47967f92487..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,171 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -private let dateFormatter: DateFormatter = { - let fmt = DateFormatter() - fmt.dateFormat = Configuration.dateFormat - fmt.locale = Locale(identifier: "en_US_POSIX") - return fmt -}() - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 7bd1267e95f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 9d4101c3cd4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - open let statusCode: Int - open let header: [String: String] - open let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 52c1d3bd2be..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapProperty: [String: String]? - public var mapOfMapProperty: [String: [String: String]]? - - public init(mapProperty: [String: String]?, mapOfMapProperty: [String: [String: String]]?) { - self.mapProperty = mapProperty - self.mapOfMapProperty = mapOfMapProperty - } - - public enum CodingKeys: String, CodingKey { - case mapProperty = "map_property" - case mapOfMapProperty = "map_of_map_property" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da8907..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f5..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index 399a062cfa9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var _id: Int64? - public var name: String? - - public init(_id: Int64?, name: String?) { - self._id = _id - self.name = name - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index 28cb30ce7b4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ - -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca3728..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 2860f907851..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f2893..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 7ed6aad907b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ - -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index ce9ffe4fb38..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ - -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e7..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index f2b7565e2d9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var _id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(_id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self._id = _id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case petId - case quantity - case shipDate - case status - case complete - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index 971ce9d4db6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var _id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(_id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self._id = _id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case category - case name - case photoUrls - case tags - case status - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd100..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index 076082af842..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ - -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 83efe72b8a4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var _id: Int64? - public var name: String? - - public init(_id: Int64?, name: String?) { - self._id = _id - self.name = name - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 7d6b24b9e10..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var _id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(_id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self._id = _id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case username - case firstName - case lastName - case email - case password - case phone - case userStatus - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 32601008ce5..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2179 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00B92B3A8271BE0D78B2C346A45054EB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C8922E4E1E3C67279458D892BC37AD /* Configuration.swift */; }; - 00CD0D028A7C7FAD19004F30BF905FFA /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D946B2CD75D612D3AE3F72880C7FF3 /* Event.swift */; }; - 00EA7C74AF31550D150A68EC1DB4885A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */; }; - 018C6F5369B9ECCE29BA2F43D6C12385 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6DFB261890C61E9C5ED205C350432C6 /* DogAllOf.swift */; }; - 01955339496D9F45BD537BEB03B04280 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46285A50499BCD564104AE4AD8489A48 /* Range.swift */; }; - 01BBC91167CEED10419EC29FB25A84B4 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C12C50651DC7C8FE70BC93359C255DF /* PetAPI.swift */; }; - 024712F363DB19CB17FD9F36B489D43F /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8CB70C6C6B09D4BB90057C9BA7EEC2 /* PriorityQueue.swift */; }; - 02D5452095EF961AABF5EC9484D6700F /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 110A71E71814850BBCD440AF198317DF /* Alamofire.framework */; }; - 04BCDBAEB221E44EBC35B35966D5329C /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29AE35CD92E0CB3A64D2E581DAD2CB4 /* First.swift */; }; - 04C06CF0B6C5C73B4CD192D070F21671 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 410ED99EC03614CF82F7E2CCD4E628AF /* CompositeDisposable.swift */; }; - 04E7491A1A273461D639A352FDF90064 /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5A7024FF197192803FBC9F7CEFD9C87 /* SubjectType.swift */; }; - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7FBBD15C7EDE32F75E84BF63C4A0093 /* Response.swift */; }; - 068FC2A8666D98716567362F2E0D6845 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D44154CE37C1B66CDC3D69453887262 /* AsyncLock.swift */; }; - 06F02D2382D5018D765DB0F34C9C276D /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8ED3568E09862ADC85A6FE650FEC665 /* AnonymousDisposable.swift */; }; - 0A084BBB077AB3863D1500B7E79B3FD4 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80EBCAEF4DEEB18B34DC5033FF20ECA8 /* Platform.Darwin.swift */; }; - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = C745F77F676CBAE7E68106481E9DF4B9 /* Alamofire.swift */; }; - 0A426503BF8551A7F24118E4D3133404 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A4D30F2478E26FEA80A716FA038512 /* Multicast.swift */; }; - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0C0D4B80E4F230F6A106A0E94C6A733E /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68A320DEB52A0B2CF5A7DCD714E84D3 /* RecursiveScheduler.swift */; }; - 0C8B09DF05E2E41B7DF054A3514DB945 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54212BBF40F065FC93C168C875E2E209 /* CombineLatest.swift */; }; - 0CC204661593617D4DF5240BD993DF4A /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AB42A286E75A2848A769570F01DAC24 /* AnyObserver.swift */; }; - 0CF84DB9C3AF68812DF22E3A7B1A5345 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77CBC56217930F052D637B82D048BA3F /* GroupBy.swift */; }; - 0DC13877F21F72004D7711BF3D7EFA3C /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = D73E4AE40107F9E12D9933657017209A /* Cat.swift */; }; - 0E19118925E2ABE3DFE3392B76937491 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F77FDC4F04FEF422ACDCD587C512559 /* RxSwift-dummy.m */; }; - 0E35C38093091926F74510A897639D32 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B990C87BD5B32BF54E420212C1A52B1 /* PrimitiveSequence.swift */; }; - 0E761CEA33A04DDA594CC7359F820A0B /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1C5824ADAF044284DC74D7785926F01 /* CatAllOf.swift */; }; - 10F4BDB750BA6362739BBCFD77AFFC55 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC35E81B52795E7CB75A8D1E9687BF16 /* Disposable.swift */; }; - 1316C19AE6BD02B2D67A610EB8124F48 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDE1B1C73CF83B02289A255C14E108C9 /* SingleAssignmentDisposable.swift */; }; - 14A822B7A6821B022899A68D5003C85D /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E271F2E357A3F1A972FF120671638B4 /* ClassModel.swift */; }; - 15CC488D9E6EF29B02174A4B036444F1 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60E9C1BF2A5AAD8532B83D587D4B447A /* Queue.swift */; }; - 1624BFF13E6CFADD39065BAFE15CFE5E /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2ABFCCD850DDE628412E12A3A36BC83 /* AdditionalPropertiesNumber.swift */; }; - 16E27971B029CD86CC9ABFBDAF0B50C3 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 979ECDDE99CE790DA21FE87298107E6B /* Error.swift */; }; - 17DBE97DF7E4655A51189118813169BA /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 459E274832813076884CA4287E491429 /* Using.swift */; }; - 18F3B3ECDFE24B0D2BB6DFB066A7DD4A /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFA2A0B903691A7C2293FD13EACB8E3F /* Window.swift */; }; - 1928C38569D41E9A17B2A7053C2737C5 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2133B0A357172D4E12A35C6488638D /* Model200Response.swift */; }; - 1B854BF767678148C17B436F65FEED5C /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757C5919A405D111AADAF18AFDDD9D5A /* SynchronizedOnType.swift */; }; - 1BE47AC4C39BCC2AD678B0D94066C3E7 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 274B9D4CA658622B79DCE0F5E736A061 /* ObserveOn.swift */; }; - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39AE2AD9A01457ED8AC57D692A5F40AD /* Notifications.swift */; }; - 1FAE4751B8A1A4906CA23B6D14705DD1 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB54B43833CB03F1D8749CE7C298D3B5 /* ObserverBase.swift */; }; - 20C9165173E84E273472110B783CEF0F /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF070C783A6786C9C92AA917E9AC879 /* HistoricalScheduler.swift */; }; - 21EA0909C5162AC1A2F0BEB44161C091 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FBF81FDC5C51FD450958591E8EAF6EA /* ScheduledItemType.swift */; }; - 231FF5CEABDC19D5620EF1D250075969 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40D138874AFF1185A99996B4180C5AAB /* DisposeBag.swift */; }; - 23F822E146B3F3C63EF430F9ED1EA5B5 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1DD94A10F409B4316DAC2A019FED34 /* FakeClassnameTags123API.swift */; }; - 247F1D441C3FFE1A86775F95FD5C526D /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E5B43302C88640C1A05762A037012A /* Generate.swift */; }; - 26BE990BD12DA8BA3E8C11D9BE7A095D /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF5386FC035BD7FBDA0B02884DE8324 /* SynchronizedDisposeType.swift */; }; - 2832890547C0F2BC47A5ACB24FE1E556 /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F4524003B8CAF5944F3FD37875D795 /* NopDisposable.swift */; }; - 28783CBF85DD482E1793B019CD5E056A /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6C60D7E233892084DAC43F60C64C60 /* ObservableType+Extensions.swift */; }; - 28BC7B80549B8F4B21578D07D2D853AC /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19A8FEF66E4D85F1B100E0AD77AC60B1 /* TailRecursiveSink.swift */; }; - 2A1C0B23E2CEEE38D4C0133ED988004F /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46FC0AD10406C3CE1828C826775E9650 /* XmlItem.swift */; }; - 2C5F3731461E52488C08666B9D752D8E /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2BC0F91A33991D668BEC3583CF46BAB /* WithLatestFrom.swift */; }; - 2C75624448C07245398F78A8E8F76C6C /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF92C4858F759EABBDDB45D32BE8DDC2 /* SerialDispatchQueueScheduler.swift */; }; - 2DE581AFC0E6541F53D79C9CF5BA0252 /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9FDC7E72AC896C5D9031E49B0372D06 /* SchedulerServices+Emulation.swift */; }; - 2E2C54FE54D4ED7D30B9CFD7F5CE26ED /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679C1F8FF956155F71A31E63595C9AB9 /* DispatchQueue+Extensions.swift */; }; - 2F16BB60B2A862F9988A1C1D1DB25326 /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1555637002FBEDE13C94AEA5F61C763B /* RefCountDisposable.swift */; }; - 2F73B36CB2A0C051C5FF6865EC7505A8 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBD0EFE5168A6526DB06F4A6800CF584 /* Observable.swift */; }; - 30769345FEC859A4DA77F0CBBBFF3890 /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D53702B1DFE795F10CD9F02ED7196FB /* AdditionalPropertiesArray.swift */; }; - 32C3F28679808D14D41E5CE764B18D68 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB9FF8F32D5D6FC16033AF34AC1408FD /* HistoricalSchedulerTimeConverter.swift */; }; - 32FC3AD0AB13B89CE579D458841BB17B /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0027A132D8BB718973989368CF5E63CF /* TakeUntil.swift */; }; - 3548E9B5F3D2CB1D6CF60A2E5E5B2A32 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED1332D9E071ED0D532F6ACD2AD1AC38 /* SingleAsync.swift */; }; - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720601B930B8E6FB3B449B0C3EFB451F /* Request.swift */; }; - 367D7C38C9D75A77C7803E9ACE55F939 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87ADA33E38CF943875922CB316D2A29A /* Order.swift */; }; - 37BF531FD8F4EF30E68E9A205BDAB096 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD8220D45545AC2A21A066A562081FF /* Optional.swift */; }; - 38B3FCCBE586F4016F203082690CEE6E /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89F6DBCB4EBE505168C934C00DB909D /* Lock.swift */; }; - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */; }; - 3CB84F06C826903645D046E00A08E94B /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FDDD670EFAE8A21A0BD76C684193FAE /* RxSwift.framework */; }; - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C008FB60F065D079DB1F0C69B60DDEA /* DispatchQueue+Alamofire.swift */; }; - 3E3FA01E3DC9CFFD4C738E922CDFA23C /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25BFF9CA1B3C8219A5F2A1C064AA6AA /* CombineLatest+arity.swift */; }; - 3E4C76A301104B55E4A601D4E59AF14E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57C559BAD8B2B8C949DA1C1837C049C6 /* TakeLast.swift */; }; - 3EAF0605A2B6B9A90A06560FAED89BF9 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C736C5D0850FA27DB5D0E58640C537 /* Timer.swift */; }; - 400710E3FF438CDC18E6D19C8E64E0D0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */; }; - 40DC18CC960EEC0EE71E945A73F6D7BC /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A00016C4275D6E28A1DD5AD98AC9AE /* ObservableType+PrimitiveSequence.swift */; }; - 411F93A1F501D9CE8A7BB17463F88BF2 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C4BA95A0FC85CD30E5DD59545AF87F /* Do.swift */; }; - 418B6C450B8DFDF393B4EF9D8F2CE920 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF174B49C2E16DD172055DB12BC37B2F /* SpecialModelName.swift */; }; - 42403A783F23CEE64D8AF4D9BDB87802 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D765DC1CA9E827C5C155427A9C020AF8 /* ConcurrentMainScheduler.swift */; }; - 425395ADB55B02A98D0538731936BD79 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49E9CEC3564840C6531A01B3402A3A12 /* Catch.swift */; }; - 438765B0F3642DE51D314A21726679AF /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8308F433372AEFC6D557F1856FC9DA01 /* JSONEncodingHelper.swift */; }; - 4481D7A928F997D2717CA342C9CAF3AC /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95AD1D226C3858D35BDFD664BBFCC02 /* ConcurrentDispatchQueueScheduler.swift */; }; - 45EF4D7DAC7881BD321F59D769C3ED56 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291E627729F653AC7E4BAB6FEDE416E3 /* Filter.swift */; }; - 4B3E6EC0A866782A28E4504AC67B4A1A /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0757CDB69F181DE86D31F260259CC63B /* StringBooleanMap.swift */; }; - 4CC43360234D5FCB4E5CAA95BAEF47C9 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EC9D77DAB6AE650C74E828CE1557C00 /* MainScheduler.swift */; }; - 4CE0D20F55D373232019950D791B50AC /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65FF8529B526BB8EC9A7CB5716CEB89F /* Zip+Collection.swift */; }; - 4D491A944EF08F4B8656305C65C71C76 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5076FFA46D2287FC8EC0C217FC4BA0B7 /* Zip+arity.swift */; }; - 4EF745BE3763312A553314237EBB7B3A /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB709FAE1018A60657705217C88967AC /* TypeHolderExample.swift */; }; - 4FFF28AF1937884226953CC18EFFACCA /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8688291EDCC3CA07AEFAFFDC3ABBE224 /* Tag.swift */; }; - 51FF11FC8E286A54377E64297EEA7696 /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D048EFF0C58F0BC4BBC956A98937739 /* ObservableType.swift */; }; - 5318E7579B1107A6E6B8A80EAC437FA2 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33796A172718E1356E0E8337BAE01CD2 /* SchedulerType.swift */; }; - 536174909D73A714232615AB05687E15 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C308A93504B6AE628F892297A6EDD347 /* InfiniteSequence.swift */; }; - 55952681015C9453540298BF9C091033 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342554F69C1610DDADF3EBAC284CC8F6 /* UserAPI.swift */; }; - 5615DD06EEEA89A9237BB15D2E516B79 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5FFB8448F56996188428783F8C6C98F /* Disposables.swift */; }; - 5720D4DCF4AA3DDB9D45802B854852A1 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192DC760893AF9295AD26599EF40763D /* Sample.swift */; }; - 584C49BA4DCCCFD50B2FAF41783029C3 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 321D200CF6D488D976163C6A790DB8AA /* DispatchQueueConfiguration.swift */; }; - 5905B99E94D9ECE5157217BEC60C4FD9 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0440E1381A0610C4FE76AA2AF1814289 /* JSONEncodableEncoding.swift */; }; - 597234E9E02E21C0F83911110DCA6E74 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47729A51DD7F47ED910F54FB3FBE5393 /* File.swift */; }; - 59A7BE86B0880261634D8F6F18EEB240 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AE2157FA464312716D670ACC5FBA81 /* ArrayOfNumberOnly.swift */; }; - 5A74E080F11D3B73C6E6A2E406E7E648 /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 836ADD02498B971DAA473321782A72A0 /* StartWith.swift */; }; - 5B4412836335EB28C03D517FD6F7EB65 /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEF2F44C17F277967404CE3DA788FD46 /* ReplaySubject.swift */; }; - 5B8FDB00381ED25B1D5F06A29649ADEE /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E4025C4EF246541D617C626370FC16 /* Client.swift */; }; - 5B9F60D1EEAA27243456F6F5DE0FA31A /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = B23D0E4BD36D6E24C66A8DB3F81FE656 /* ReadOnlyFirst.swift */; }; - 5BC3B4927F5E340F661D56FCF2B51D75 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305616479EFCF33CB4768627955493AB /* InvocableScheduledItem.swift */; }; - 5E08679A799BC6809B8DE2089F06E621 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = C692DE62E3C756A61E2E9C829EA0BCE6 /* TypeHolderDefault.swift */; }; - 5E4C98BF473FF5D493E130A785EB73BA /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7239C4B748D482C26AE3B3EC168AD371 /* Category.swift */; }; - 5FB1BC9A57D01324146B7AE5F03C6370 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F929FCCF076F0A692EA809B17DD7F31 /* Dematerialize.swift */; }; - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = B22AF668079FC82298B5D800D6E575BB /* Timeline.swift */; }; - 60F135C1B2E2A3DBF5D91AAFEC889628 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F63D218F3E7685156696F53CEAB647 /* DefaultIfEmpty.swift */; }; - 611DDEABDBA112B4ED8A489288C5E3AA /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACC20A8939D21B502E71D99F130B013E /* NumberOnly.swift */; }; - 63B9CDC423637A15BD3F8F4B9651B62D /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3B9412BBCE6A74BC742A54FD0B8186C /* Zip.swift */; }; - 64E469791F8F79F87724641C4B16AF22 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387EBB01DADD396614945A01970A8222 /* StoreAPI.swift */; }; - 654F552A8DD4BF67850CAFEDF249D815 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1FC53345CBCE9EF88576C6BDC5D16EE /* Skip.swift */; }; - 69E9DE3AD0F2CA6895BEAFA6691914BB /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A9349CCCD01B8CD6646B22BD8FAFFD /* AnimalFarm.swift */; }; - 6A3FA5DFDE7C0D52EA3B3E4A62F2969F /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = A933D6B3F16C58A90BFD589C4B23EE38 /* EnumTest.swift */; }; - 6B1C6B7CA8A53D9502AE9EB84CA3181F /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B003673B45236AA5A51A70A733399D /* Empty.swift */; }; - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */; }; - 6B9765DD631FED6DDDE0393B076895CC /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62326983DDFE0858FB48A88B024EAE9D /* Debounce.swift */; }; - 6C7F38FABFBDF77E5B4D6AB137E0A5F4 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6DF985F6F04F63AA4A9AE7866CB8D22 /* FakeAPI.swift */; }; - 6CB554A9CE0D611C158CC5B9DB6873D7 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = E237960AB17F68A30227D83025D39488 /* List.swift */; }; - 6D1DF0296E23FD6AD4E4676FD690C3BA /* DeprecationWarner.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D0270A8CD4CA80B74E5EC729FBC1A7 /* DeprecationWarner.swift */; }; - 6DCDEA9935C7542C76178B25A7D873FF /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC49CD3902CF252FAA732A1DDA1DC1C9 /* Completable+AndThen.swift */; }; - 6E428993840E5F638CFD77582468C982 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43029CD91769D491E685263C4CB46A97 /* DistinctUntilChanged.swift */; }; - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95300CC9035C5766B62FE4FB54FA5951 /* ResponseSerialization.swift */; }; - 6F3CA008415A35BA7E271CFBB8311E6F /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5420BA5CD952DA0D4A8A31E4D69CC2 /* Sequence.swift */; }; - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A0FB6358543AEAB83BC45DD397D732 /* ParameterEncoding.swift */; }; - 7105E17FDE296BA6B37E8B5E2AAD9058 /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E7E635C33CF3DE53B838B378535F65C /* FormatTest.swift */; }; - 72F440B2AB88E31879EE58D8B7D5A05E /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E147BD28F065756948CC15F0E6B68D /* Producer.swift */; }; - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8383047D766DF909F58645FCCF42048 /* NetworkReachabilityManager.swift */; }; - 755536BB16D53CBC961B0A8E3FDF7739 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42B2C25A2A499E0244E107DF28BA640 /* Timeout.swift */; }; - 76079C032826A835D0B13E6D617606C1 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 417E0C1C7F4C17857E4C0D19275C6973 /* AdditionalPropertiesString.swift */; }; - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4CC7E2EF21164D2E203FEAF12D869A /* Alamofire-dummy.m */; }; - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575E60871C2A868C6B6D235B2DE25D83 /* TaskDelegate.swift */; }; - 786342EA1908DF041945B208001AB341 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B63E482462E54A5366DAEA6318FB7E /* SerialDisposable.swift */; }; - 7893293BC4613AE2625D1684ED6888AD /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B50B0F2486C6BB7F3AF76CD685C8B4E1 /* Rx.swift */; }; - 79523FA5D24E7AC22385AE14E18FA1CB /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF198528C6AE20A99A5E33F76D0C527 /* Map.swift */; }; - 7B5B94CF82B28AED61861EC39D661BEC /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71552570D704D50ABA564EB978406FA /* OuterEnum.swift */; }; - 7BAA9953F0607C50A41C04848C10E156 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32DEB152EA23784FF891FB3850E4A1FE /* Pet.swift */; }; - 7C7B2182C3E7D832DF075B3016ED1B05 /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4584BAE72539FDF3D31787762B39D0 /* ObserverType.swift */; }; - 7D3D0B52CF0C6CD831B149E64FE4AB3E /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E3B161DE103995FAFA429C1AD3E2875 /* DisposeBase.swift */; }; - 7DC19974867E0956AD13FA28D9038536 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44F10FFC1F6C0F6A0F7C003C038C272B /* ImmediateSchedulerType.swift */; }; - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD714B38F6C265C97287CD6F713F3398 /* AFError.swift */; }; - 7E79F3A456266FFDA768E0CF14DBC2F1 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC22F330006EA5F892970C69FBA9F199 /* SynchronizedUnsubscribeType.swift */; }; - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */; }; - 81690915FE86ECD7CDE95633E3762009 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE9C5D5D818389294D9B773DD491B146 /* AdditionalPropertiesClass.swift */; }; - 82D86B9AEF31C560C2A0DB4FC9B979A1 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = A403B12907B25FC32930C07AD4DF4600 /* HasOnlyReadOnly.swift */; }; - 83637EFE9CFF36EC1E7A73CCE55884B9 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F4546CAE8AC2D5BD71A14E476145C771 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8487CC1DE956BDEEAC9CDF413E1A58E4 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = C894BEC0DE9A446CBB01A0B7D63DA38A /* Materialize.swift */; }; - 860138DC0F719DA0953C144268F4FDD7 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2944F75CA2FADBE47B2326252AAB5A /* EnumArrays.swift */; }; - 877B7447EF54C9ED4966D3D1AA9B8D07 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25DE89C483E14ED16E9B0F96850BF3B /* ArrayTest.swift */; }; - 88B8F96E58CD89EC10B74A1F8365F6FD /* Pods-SwaggerClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8A3542104FBA7C2FA7BF8E95AAAE0BE7 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22F3BDA0C336074E5EA13F37C05FF2C /* RetryWhen.swift */; }; - 8BB1ACFFA7880AE54B7300AF440F549D /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F1E9D95E719B94DD98DDDB394278F2 /* PublishSubject.swift */; }; - 8CA88B336020592CDC5F3548A4DFE697 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33FB85D186079ED93696702AD931FFDA /* ToArray.swift */; }; - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A56088E87A9AACE94749A936B309080 /* ServerTrustPolicy.swift */; }; - 8DA0C6077B07424B6848BD63049B6777 /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F819D835354426411C22FB35823EAD /* AddRef.swift */; }; - 8DDD2130C49010F4CCBA6EF665E1288F /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1FE5BDED74EBDC047C5B437A524854 /* ConnectableObservableType.swift */; }; - 8ED35E25E311CF3F12564041A7F8BB2B /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB4CEA0C0A7C4823A04EAD9FBA3961D /* Throttle.swift */; }; - 8FAB1056E36610DF9EE92221941D800D /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6BAA110BD7DD59D40985519BC3BAB2C /* AsMaybe.swift */; }; - 92BEB5554FA6A51ED6995B19BEC8D7ED /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427485D09ADF908E73C20C8E8F56313E /* AdditionalPropertiesObject.swift */; }; - 93000BED51CFB0CDB262C897C8C104A7 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAED0C18FF2FC7D97F0E5B2D4FE37F2C /* Switch.swift */; }; - 93D8F9361CA384D802B729C027A29D93 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13431ED497EC52994DA35A8DD3CB5C3C /* DelaySubscription.swift */; }; - 944A8ACBB625207067C5A154726E140A /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0568635049F72DE8DD05757186436324 /* Return.swift */; }; - 94C2BDABC69296B090CFC89FD5483D41 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF699627254D1F4E425E37E0306B828B /* Bag+Rx.swift */; }; - 957BB9043F5F5609C348C47C523D6C79 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8050204E8821E9A399D7E830591E063B /* Take.swift */; }; - 9587E802C281FA381DF9E97EC426814D /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5CF777F69E934A92F78512092C53052 /* LockOwnerType.swift */; }; - 95A5DD145CB674719312A9CCE333C40A /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A297E0A593ED4485BF3BAA9211E812 /* BehaviorSubject.swift */; }; - 96ED1FEACF444FF70C6550E95A572890 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452FB9512A491F731556BD2F110347ED /* AsyncSubject.swift */; }; - 96F8C88984B492B5D186D6DC6FEF8D0C /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C65830349B23D7E262AB27BAB0E8188 /* PrimitiveSequence+Zip+arity.swift */; }; - 97AEDE420913FDB38F1F907BBAAF2E8B /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBF9232381581A50CA2E8FA9517D76EB /* Deferred.swift */; }; - 97BF7A9642F28D14C03458F24C030DB2 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = C645ED7A39D8B9114C20CAFE2B7FBC2B /* AlamofireImplementations.swift */; }; - 9C66CB81052F764079D0FA68B6E36BEF /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97D7A50019AFFCCD39301BD1E594F91C /* SwitchIfEmpty.swift */; }; - 9C894D0C88D763CD86C16DDCE698F9B3 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2EDBEFED12864758CCA6F411205AB2E /* SkipWhile.swift */; }; - 9CD65D0519639A42284304F6A662E10A /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CEA210E8205F311B1A19569BCDDEF63 /* RxMutableBox.swift */; }; - 9D443C8AF196B744F2340AD3DCE6CE0A /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73E2FE9C0296B7647E36FDAB1A48E6E /* Errors.swift */; }; - 9E28E0EB779608B1E70DD6319247E826 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ECAC6F788B1B30D9157D0A0ADC1148B /* FileSchemaTestClass.swift */; }; - 9F9CF99BD0C63948B4413396FD8DBA54 /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55000F129FE5A09A0B51661892DB1F4E /* RecursiveLock.swift */; }; - A06C5095E2319DD4B8B8047539769999 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = D406BAD811EAD0952929B093F56F2BF2 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - A1A4F6F86BDF18C228F08311EBD03E84 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FA93D91962228BFC4F2058578D7A9EB /* GroupedObservable.swift */; }; - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 378449150E818606AADBD6FB5A562D0D /* SessionDelegate.swift */; }; - A26702A2CFB5B831F7FB80FFA29BEEEC /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB834FF7C5DF4A05EB6179428E1A2D30 /* InvocableType.swift */; }; - A5E492F7194809622E130CC6569F46E2 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70180A07F00266A41D515742CBA72B74 /* SubscribeOn.swift */; }; - A9A00DE2FF9E8E7E0C750F495837D99E /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8B9F6DB3E903DC9635F9DA16D90A0C /* Cancelable.swift */; }; - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51BEBD9500775258E10801B2D4636130 /* Validation.swift */; }; - AA6D3CED1566D71B0E39A1CDE3B32864 /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAFD9A5AE325CD48442A611EFD103D57 /* Enumerated.swift */; }; - AAA1712D2763B6D2CF0011403EBE512D /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F4E8DC898B4C8D35F09B107CE705172 /* Amb.swift */; }; - AB6D07352A2E898824B49759CCA162EC /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7628A653BCE0CE4F0CA24E4699FF04E5 /* AdditionalPropertiesAnyType.swift */; }; - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = D335B34B9871B74E10984781CC371CBA /* MultipartFormData.swift */; }; - AEB4C18DF052DCB1A0FF1EA600194A2E /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BE3C1FFB1B8A373D68AFE8E2CE9E5B /* Dog.swift */; }; - B01F02AFF4BD60048220EE91C369DA72 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9289A1C05392D4FF88A897B4FDF77958 /* Bag.swift */; }; - B2F61D4C66E7E9BF795A768F9A52F889 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F10D694F6B9493FDA575E60FE695722 /* ElementAt.swift */; }; - B312CFC44488357265F713C8EF63291C /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E67D2FEF499445214AF84B7B9C9B33E /* TakeWhile.swift */; }; - B385CD158B4DB49B50E46C688B9F0AED /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C7E8D8382CCB07D68866B995A900D74 /* AtomicInt.swift */; }; - B38FF962610DEFB271EA1FCA95E3B37A /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25B4A2E0DAA89840BB58C5D472574F66 /* SkipUntil.swift */; }; - B39356F857F84E608624AB4BA381F5B9 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A64F269657828EFCFE8BFEBEC769FC /* APIs.swift */; }; - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AE110F03859CEB598ADBC6AF0026E6C6 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B7A2C80AE512BA32546E4BB9213F70CC /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A9E858642895322172FF16226C86AC /* Buffer.swift */; }; - B7CC8FC752B3A986B9DFC4A0F09BB316 /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE0D448C7D74BFFB8604285DD7047EED /* ScheduledItem.swift */; }; - B822D1C05E59F8303723EA7F59C78F40 /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA9CEE837EF5EE1215788BEBC3959479 /* Single.swift */; }; - B8407A12CCFF56CC0C1C34C1B8A9F8D9 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75E2A26619203BE094E23132BE4F9C6D /* OuterComposite.swift */; }; - B9EF5A80D032538680EFE75929C28D6D /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE64C63DA4FB40ACE396982AAB244DC0 /* ObservableConvertibleType.swift */; }; - BA2E85147C4CE9D6AA9EC39DBE99A6C0 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28350F99E9985C0EFD64D72D74A3BB5B /* Models.swift */; }; - BA8C86B1D885FFA4850EC5F3528669E9 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = D10F2A3D1BBD10CA8594739DB19CDC07 /* SwiftSupport.swift */; }; - BB7E003CB2D82BDBBBE3A9E1AA1C1682 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B49FF45429D57DA0487C5BD90AA6398 /* CombineLatest+Collection.swift */; }; - BDEA420ADE6E58BFDB87E1339C6EF292 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */; }; - BF15B41D6CCCFAF4DCA617D0431D4781 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B1CB7693D74DF7AB61FB3A0064A532 /* Platform.Linux.swift */; }; - C0A9C53855321304AFBE800FC3BB8864 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FA27876F7533BCDAAEB14AED6CC511 /* MapTest.swift */; }; - C1942DA08443E26FE1CD7BF2A972B27C /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2788B53C02374D910EFFBCF48BFF0B1D /* String+Rx.swift */; }; - C2C0AE3588986E52B3965206EC540324 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CFB12945932D18A9721B6AF2D8D871E /* Delay.swift */; }; - C3F9BB06A12A0F61CDC2511CDDE62B09 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D4EF25430724C9CA591320E91F6ADE /* AnotherFakeAPI.swift */; }; - C54FB31D5C9750E9722B2EBB3C05754F /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = C638F1FAA7FFA890ACB0BAD594BAA07B /* AsSingle.swift */; }; - C8371B319EBEF3DFDBA5C573AB46EB4C /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E62E4A381F97286B84952D8ABA59681 /* Animal.swift */; }; - C88589E390360E93817DA97CBF5DCBA4 /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ACE6B378AD271E3ECC20C3EB267F4D8 /* Completable.swift */; }; - C939859F6DB0464712141486E944F42C /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = A14370E500BCD2443559DB70F2786EB6 /* Maybe.swift */; }; - C99C068899D064944E605570D38E85F2 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060AAA21729D90B11F6FD9102F628758 /* Reduce.swift */; }; - CAB19EE096FBEAAE1FDB28F56B8B4F78 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4EA9F3121FB3144A5648BBC0A8004D /* Merge.swift */; }; - CAFFB7A58F51661BC7DD5284276EC1ED /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA209283C4EBF0544FF63C7D1BCC40D /* VirtualTimeScheduler.swift */; }; - CB69E0C638A7C58B5FC9073B793273AD /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3DC61667E570A41266B09E2160DAF2D /* AnonymousObserver.swift */; }; - D0847A960A008DA8608CBCF219A8A2A7 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 745314207D827581C481CE38F4AEB7A3 /* VirtualTimeConverterType.swift */; }; - D0E317E6FC43BC7D4F07C17B584D8EFD /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EAED007F778FE48F4D3EB2B398B0AFB /* Repeat.swift */; }; - D128DB98CB0B97380BDEC326306D0FFC /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C71AEC0AF13D31F11719E203832081AF /* Concat.swift */; }; - D399C483EEF039C293A7B84B82BE2B49 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59A65FEE7BCD66D95A4A236D44082214 /* ArrayOfArrayOfNumberOnly.swift */; }; - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C7203E47628DD3832410EEA16A1D8B /* SessionManager.swift */; }; - D706A86E37DD6D833CA7A079A3E15B7E /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE70B57B6CF22A99EBDA453C12741148 /* Sink.swift */; }; - D9D43BA204D86056FDBFCC92F87C7EAB /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA01D2A2DB1E31168FFF75C6F9DAD5C5 /* ShareReplayScope.swift */; }; - DB2950EE1B19C535EBD1E572494F55E5 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C3FFE137AD3E253AC3CC98BDB629E1CC /* PetstoreClient-dummy.m */; }; - DB94F9F67A94D6A5CBAA286F44ED10ED /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEFFBEEA8F7216DF65BD978A823BEDA2 /* Name.swift */; }; - DC551676E7C8D267368063D532D092B2 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 498E9106F2911C5C575288660EF2C14A /* Never.swift */; }; - DCAC99A86576E188AC0079FE5607C541 /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35FACC9017B95B9A2C4A6F43E6168BE3 /* CodableHelper.swift */; }; - DED9A421CFF78F29A27F00A43A5478D1 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892F30771518EB494D89A92413C04E85 /* Extensions.swift */; }; - DFAA7C26B25E676D63DD5FD0D74ABB30 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0755658D38EA295B964DD3D2AE6130E8 /* ApiResponse.swift */; }; - E16F11503BA04EC3B205DBF20BD33DE1 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95243E9789D171D24B3CCEF4A306E79 /* Just.swift */; }; - E2A989FE2A8C7E19B78150061B1F404E /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1259C7EE8FBB3A324ED66A0FBE292D2 /* EnumClass.swift */; }; - E38FB4D007348119E958AED58DDD44B4 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9ABCE94A0D10DF97FC367C061436E5F /* OperationQueueScheduler.swift */; }; - E403F1184BAC06680AF116EE8EDB7BEF /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240EE4633A0C295594350E7EC54BA3DF /* Reactive.swift */; }; - E4962E9CD3D8EA651C84498D271EC753 /* Pods-SwaggerClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */; }; - E4F4D8D1953813B37BD79C66BE55B132 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DE248049BE51CEA8ED1544F9D7FE9E /* BooleanDisposable.swift */; }; - E4F50B1433000199FD611EEBCF3B6BB0 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = B374449845CA94813BACD80BE4751992 /* User.swift */; }; - E6CAA0D168E81EF9679A5388F4BC95D8 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C42EB9688F37F35C9110C57A8075DC4 /* BinaryDisposable.swift */; }; - E7AC1A5D6FA609B69AFDE50FC01127F2 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4218AB53A6385BB02D95ED58A63B6AB /* SubscriptionDisposable.swift */; }; - E8BF5D98F29555477C6236F1890DF767 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE55486083AAFB05A421910D689676CD /* APIHelper.swift */; }; - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = E708A153C22A9339B8145278E89E64D8 /* Result.swift */; }; - EE1917B8030B1B81478973483D704AAE /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE02647BBDB83E0D48469A56FBF37C88 /* Debug.swift */; }; - EE2E9AE7C6CDF0C9D9E77E6EB2800E40 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9D6B8A244BC24B1DFF8AE87F94F792 /* AdditionalPropertiesBoolean.swift */; }; - EE5BB9D47B59D64E282A3FCB17CD6132 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = B498E7AFBD0589628B31BD16154B20FF /* Deprecated.swift */; }; - EF7CEEFEE64CCFE8E050F33E8E6716EB /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8942B778DC2EC96252BBB267B62D566B /* Scan.swift */; }; - F2179ACF4366D4B4E62CD5C99FA1A679 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39F74B8F482952B4F0D1ECBE5D900E09 /* Capitalization.swift */; }; - F33B53F266660974D851A82B03B2907E /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32615BCCDB0302A683583113699C168B /* Create.swift */; }; - F3B7AF12D1FD688C8942217F918E2917 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B22542F5E9A061C9F6214D75923635D /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F77A046367A53931C9B4424F17D83BB0 /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB268230F2A96F71335E107E497BC32C /* AdditionalPropertiesInteger.swift */; }; - F7D0A45619BD381EC7FDEF8F41057C4A /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 717C1608162B27019EBC04A33444BAEE /* ScheduledDisposable.swift */; }; - FCFED59A764898B95991A177DDEB362E /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18AB9B87BF0A071727872B64CC84137 /* CurrentThreadScheduler.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 116DEBAFC9022016EADCAFC9F9BC1542 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BA1FAA79F9B74485F4D7279FD41A7D1D; - remoteInfo = RxSwift; - }; - 2A8AF3B6391C5FF251470E3091B2B1D2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - AEA2781CDC8DB413C920DD9F7F78F124 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3383968E74B5371B20BB519B170DC7FD; - remoteInfo = Alamofire; - }; - B36C681A6EB35CB2430BAB3BAF9AB886 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 49CDD5ADAF3DA23F4C622CC2F9A75659; - remoteInfo = PetstoreClient; - }; - ED09ABD99E0D387BFD78CCCE937FA689 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BA1FAA79F9B74485F4D7279FD41A7D1D; - remoteInfo = RxSwift; - }; - FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1BAC3F8145EDD03FE8EDB0EACEAE3522; - remoteInfo = "Pods-SwaggerClient"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0027A132D8BB718973989368CF5E63CF /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; - 02322A6B0543DADA4A6CB13A420ADA46 /* Capitalization.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Capitalization.md; path = docs/Capitalization.md; sourceTree = ""; }; - 02C7203E47628DD3832410EEA16A1D8B /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 0440E1381A0610C4FE76AA2AF1814289 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodableEncoding.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift; sourceTree = ""; }; - 0568635049F72DE8DD05757186436324 /* Return.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - 060AAA21729D90B11F6FD9102F628758 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; - 0723F133C41FD08232F74124D0E3FC2E /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 0755658D38EA295B964DD3D2AE6130E8 /* ApiResponse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - 0757CDB69F181DE86D31F260259CC63B /* StringBooleanMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 09F1E9D95E719B94DD98DDDB394278F2 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 0AB84B97D3A773262405DAE614E8AAC8 /* ArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfNumberOnly.md; path = docs/ArrayOfNumberOnly.md; sourceTree = ""; }; - 0ACE6B378AD271E3ECC20C3EB267F4D8 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; - 0AF5386FC035BD7FBDA0B02884DE8324 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 0B2EDA68E233F400804C89253BBFB2E5 /* TypeHolderExample.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderExample.md; path = docs/TypeHolderExample.md; sourceTree = ""; }; - 0D180F35B94BC88CF6D264D1CDF42624 /* MapTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MapTest.md; path = docs/MapTest.md; sourceTree = ""; }; - 0D4584BAE72539FDF3D31787762B39D0 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 0F39AA54BB1773329C8151B721ED0D09 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0FA93D91962228BFC4F2058578D7A9EB /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - 0FDDD670EFAE8A21A0BD76C684193FAE /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 10A297E0A593ED4485BF3BAA9211E812 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 110A71E71814850BBCD440AF198317DF /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 13431ED497EC52994DA35A8DD3CB5C3C /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; - 14AAB621715B4F0218EABE72CE972494 /* PetstoreClient.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = PetstoreClient.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 14D946B2CD75D612D3AE3F72880C7FF3 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 1555637002FBEDE13C94AEA5F61C763B /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 192DC760893AF9295AD26599EF40763D /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; - 19A8FEF66E4D85F1B100E0AD77AC60B1 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 19B33AA036CD6E46A97113343C8904A0 /* FormatTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FormatTest.md; path = docs/FormatTest.md; sourceTree = ""; }; - 1AA4FF009847666EB74179EA6C75DE4D /* FakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeAPI.md; path = docs/FakeAPI.md; sourceTree = ""; }; - 240EE4633A0C295594350E7EC54BA3DF /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - 25B4A2E0DAA89840BB58C5D472574F66 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; - 2740D21DE2F99C963ACDC4261609EE50 /* NumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = NumberOnly.md; path = docs/NumberOnly.md; sourceTree = ""; }; - 274B9D4CA658622B79DCE0F5E736A061 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; - 2788B53C02374D910EFFBCF48BFF0B1D /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - 27B1CB7693D74DF7AB61FB3A0064A532 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - 27F63D218F3E7685156696F53CEAB647 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; - 28350F99E9985C0EFD64D72D74A3BB5B /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Models.swift; path = PetstoreClient/Classes/OpenAPIs/Models.swift; sourceTree = ""; }; - 2895E1635E3A30E234670ED9283C23EA /* MixedPropertiesAndAdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = MixedPropertiesAndAdditionalPropertiesClass.md; path = docs/MixedPropertiesAndAdditionalPropertiesClass.md; sourceTree = ""; }; - 28DB89F2024F2DDD08AE89C3006D009E /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; - 28DE248049BE51CEA8ED1544F9D7FE9E /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - 291E627729F653AC7E4BAB6FEDE416E3 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; - 2AE97CCDC8C4D014282DFBAE17CD786F /* ArrayTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayTest.md; path = docs/ArrayTest.md; sourceTree = ""; }; - 2B2AAC902CD2815AAAFD57064F19AB84 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; - 2BF070C783A6786C9C92AA917E9AC879 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 2C7E8D8382CCB07D68866B995A900D74 /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; - 2CD8220D45545AC2A21A066A562081FF /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; - 2CEA210E8205F311B1A19569BCDDEF63 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 2E62E4A381F97286B84952D8ABA59681 /* Animal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 2EAED007F778FE48F4D3EB2B398B0AFB /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClient-umbrella.h"; sourceTree = ""; }; - 2F4CC7E2EF21164D2E203FEAF12D869A /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - 2F77FDC4F04FEF422ACDCD587C512559 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 305616479EFCF33CB4768627955493AB /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = ""; }; - 321D200CF6D488D976163C6A790DB8AA /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - 32615BCCDB0302A683583113699C168B /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; - 32DEB152EA23784FF891FB3850E4A1FE /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - 33796A172718E1356E0E8337BAE01CD2 /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 33FB85D186079ED93696702AD931FFDA /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; - 342554F69C1610DDADF3EBAC284CC8F6 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 353DE1A4F630D656323F08E7DBB62F93 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - 35FACC9017B95B9A2C4A6F43E6168BE3 /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CodableHelper.swift; path = PetstoreClient/Classes/OpenAPIs/CodableHelper.swift; sourceTree = ""; }; - 378449150E818606AADBD6FB5A562D0D /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 387EBB01DADD396614945A01970A8222 /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - 39AE2AD9A01457ED8AC57D692A5F40AD /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 39F74B8F482952B4F0D1ECBE5D900E09 /* Capitalization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - 3C12C50651DC7C8FE70BC93359C255DF /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 3D608B4966D9E19DF62468677C823AC5 /* Tag.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Tag.md; path = docs/Tag.md; sourceTree = ""; }; - 40D138874AFF1185A99996B4180C5AAB /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - 40FA27876F7533BCDAAEB14AED6CC511 /* MapTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 410ED99EC03614CF82F7E2CCD4E628AF /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - 417E0C1C7F4C17857E4C0D19275C6973 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; - 427485D09ADF908E73C20C8E8F56313E /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; - 43029CD91769D491E685263C4CB46A97 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; - 44F10FFC1F6C0F6A0F7C003C038C272B /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 452FB9512A491F731556BD2F110347ED /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - 459E274832813076884CA4287E491429 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; - 45C4BA95A0FC85CD30E5DD59545AF87F /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; - 46285A50499BCD564104AE4AD8489A48 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; - 46FC0AD10406C3CE1828C826775E9650 /* XmlItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = ""; }; - 47214E2FA3F755CB7B808800197ECE59 /* UserAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = UserAPI.md; path = docs/UserAPI.md; sourceTree = ""; }; - 47729A51DD7F47ED910F54FB3FBE5393 /* File.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 47A00016C4275D6E28A1DD5AD98AC9AE /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; - 498E9106F2911C5C575288660EF2C14A /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; - 49A9E858642895322172FF16226C86AC /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; - 49E9CEC3564840C6531A01B3402A3A12 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; - 4A4CFDCD285AB04B85A4EF0446C859E4 /* EnumClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumClass.md; path = docs/EnumClass.md; sourceTree = ""; }; - 4B22542F5E9A061C9F6214D75923635D /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 4B5420BA5CD952DA0D4A8A31E4D69CC2 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; - 4C008FB60F065D079DB1F0C69B60DDEA /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = ""; }; - 4C42EB9688F37F35C9110C57A8075DC4 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-Info.plist"; sourceTree = ""; }; - 4F8AC481F02DAF666B64D9A62FA7109F /* AnotherFakeAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnotherFakeAPI.md; path = docs/AnotherFakeAPI.md; sourceTree = ""; }; - 4FB24B4936663207D1E346C5B6B9EAD4 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClientTests-umbrella.h"; sourceTree = ""; }; - 5076FFA46D2287FC8EC0C217FC4BA0B7 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; - 5164EAF5A81C9C991085A3D5BA3A7627 /* FakeClassnameTags123API.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FakeClassnameTags123API.md; path = docs/FakeClassnameTags123API.md; sourceTree = ""; }; - 51BEBD9500775258E10801B2D4636130 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 54212BBF40F065FC93C168C875E2E209 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; - 55000F129FE5A09A0B51661892DB1F4E /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - 55A64F269657828EFCFE8BFEBEC769FC /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIs.swift; path = PetstoreClient/Classes/OpenAPIs/APIs.swift; sourceTree = ""; }; - 55B63E482462E54A5366DAEA6318FB7E /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 55D378FA7C24F905373016C59B3BE2C4 /* ArrayOfArrayOfNumberOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ArrayOfArrayOfNumberOnly.md; path = docs/ArrayOfArrayOfNumberOnly.md; sourceTree = ""; }; - 56430A53624DF50D17D8AB350D129613 /* Name.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Name.md; path = docs/Name.md; sourceTree = ""; }; - 575E60871C2A868C6B6D235B2DE25D83 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 57C559BAD8B2B8C949DA1C1837C049C6 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; - 59A65FEE7BCD66D95A4A236D44082214 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 5A4C226AA31A4DF5F6CE9579AE514B34 /* ClassModel.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ClassModel.md; path = docs/ClassModel.md; sourceTree = ""; }; - 5A8B9F6DB3E903DC9635F9DA16D90A0C /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 5B6C60D7E233892084DAC43F60C64C60 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - 5EBFB4694957EBED5253C544C3917DBC /* Category.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Category.md; path = docs/Category.md; sourceTree = ""; }; - 5FF198528C6AE20A99A5E33F76D0C527 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; - 608A407DE2A47612643C9271D707558C /* EnumTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumTest.md; path = docs/EnumTest.md; sourceTree = ""; }; - 60E9C1BF2A5AAD8532B83D587D4B447A /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClient.modulemap"; sourceTree = ""; }; - 62326983DDFE0858FB48A88B024EAE9D /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; - 64F819D835354426411C22FB35823EAD /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; - 65FF8529B526BB8EC9A7CB5716CEB89F /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; - 679C1F8FF956155F71A31E63595C9AB9 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - 6DA209283C4EBF0544FF63C7D1BCC40D /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 6DB4CEA0C0A7C4823A04EAD9FBA3961D /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; - 6E67D2FEF499445214AF84B7B9C9B33E /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; - 6EDF3214C286AFD4841B3551A037B0A9 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6F10D694F6B9493FDA575E60FE695722 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; - 6F9F8165FD8B1C4B07F06F5DCDDDE89A /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 70180A07F00266A41D515742CBA72B74 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; - 717C1608162B27019EBC04A33444BAEE /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 720601B930B8E6FB3B449B0C3EFB451F /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 7239C4B748D482C26AE3B3EC168AD371 /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 745314207D827581C481CE38F4AEB7A3 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 757C5919A405D111AADAF18AFDDD9D5A /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - 758C5C2D6382B0F77807EFFC06E82BC4 /* OuterEnum.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterEnum.md; path = docs/OuterEnum.md; sourceTree = ""; }; - 75E2A26619203BE094E23132BE4F9C6D /* OuterComposite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - 7628A653BCE0CE4F0CA24E4699FF04E5 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; - 77CBC56217930F052D637B82D048BA3F /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; - 77E4025C4EF246541D617C626370FC16 /* Client.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - 799B734D0D692695C613949A6115718D /* Dog.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Dog.md; path = docs/Dog.md; sourceTree = ""; }; - 79A4D30F2478E26FEA80A716FA038512 /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; - 7AB42A286E75A2848A769570F01DAC24 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 7B49FF45429D57DA0487C5BD90AA6398 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; - 7B990C87BD5B32BF54E420212C1A52B1 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - 7C8CB70C6C6B09D4BB90057C9BA7EEC2 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - 7D2AE1A0BBE6459478A73D38848B588E /* AdditionalPropertiesClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AdditionalPropertiesClass.md; path = docs/AdditionalPropertiesClass.md; sourceTree = ""; }; - 7D6449B4CFED6A13D7216B47179E7E4A /* OuterComposite.md */ = {isa = PBXFileReference; includeInIndex = 1; name = OuterComposite.md; path = docs/OuterComposite.md; sourceTree = ""; }; - 7EC9D77DAB6AE650C74E828CE1557C00 /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 7F4E8DC898B4C8D35F09B107CE705172 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; - 8050204E8821E9A399D7E830591E063B /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; - 80EBCAEF4DEEB18B34DC5033FF20ECA8 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - 81629AD2DFFED981E047483057BE1362 /* ReadOnlyFirst.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ReadOnlyFirst.md; path = docs/ReadOnlyFirst.md; sourceTree = ""; }; - 8308F433372AEFC6D557F1856FC9DA01 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift; sourceTree = ""; }; - 836ADD02498B971DAA473321782A72A0 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; - 857C9FC7F70D66015A686E5E392AB04F /* HasOnlyReadOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = HasOnlyReadOnly.md; path = docs/HasOnlyReadOnly.md; sourceTree = ""; }; - 8688291EDCC3CA07AEFAFFDC3ABBE224 /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - 86A0FB6358543AEAB83BC45DD397D732 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 87ADA33E38CF943875922CB316D2A29A /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 88BE3C1FFB1B8A373D68AFE8E2CE9E5B /* Dog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - 892F30771518EB494D89A92413C04E85 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = PetstoreClient/Classes/OpenAPIs/Extensions.swift; sourceTree = ""; }; - 8942B778DC2EC96252BBB267B62D566B /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - 89D4EF25430724C9CA591320E91F6ADE /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - 8C65830349B23D7E262AB27BAB0E8188 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - 8CF5B2C124751B1983FA287330A81E51 /* TypeHolderDefault.md */ = {isa = PBXFileReference; includeInIndex = 1; name = TypeHolderDefault.md; path = docs/TypeHolderDefault.md; sourceTree = ""; }; - 8CFB12945932D18A9721B6AF2D8D871E /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; - 8D048EFF0C58F0BC4BBC956A98937739 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 8D44154CE37C1B66CDC3D69453887262 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - 8E271F2E357A3F1A972FF120671638B4 /* ClassModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 8E309FED474011CFC561423B6D04ED9D /* Cat.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Cat.md; path = docs/Cat.md; sourceTree = ""; }; - 8E3B161DE103995FAFA429C1AD3E2875 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - 8E7E635C33CF3DE53B838B378535F65C /* FormatTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-Info.plist"; sourceTree = ""; }; - 90A6677EB26AA075208F098879E425DD /* List.md */ = {isa = PBXFileReference; includeInIndex = 1; name = List.md; path = docs/List.md; sourceTree = ""; }; - 9289A1C05392D4FF88A897B4FDF77958 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - 928B725115295804C613BD7C865C8201 /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PetstoreClient.modulemap; sourceTree = ""; }; - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-frameworks.sh"; sourceTree = ""; }; - 95300CC9035C5766B62FE4FB54FA5951 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-acknowledgements.plist"; sourceTree = ""; }; - 979ECDDE99CE790DA21FE87298107E6B /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; - 97AE2157FA464312716D670ACC5FBA81 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - 97CEA1BED002ABF0D6E5E078FB3F5895 /* ApiResponse.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ApiResponse.md; path = docs/ApiResponse.md; sourceTree = ""; }; - 97D7A50019AFFCCD39301BD1E594F91C /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; - 98C736C5D0850FA27DB5D0E58640C537 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; - 9A56088E87A9AACE94749A936B309080 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 9A9D6B8A244BC24B1DFF8AE87F94F792 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; - 9D53702B1DFE795F10CD9F02ED7196FB /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; - 9D597D60E3BD5AEA174D24F7409820EB /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9ECAC6F788B1B30D9157D0A0ADC1148B /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 9F929FCCF076F0A692EA809B17DD7F31 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; - 9FBF81FDC5C51FD450958591E8EAF6EA /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - A0F3842CFF62B5C53CBFA83436673969 /* PetAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PetAPI.md; path = docs/PetAPI.md; sourceTree = ""; }; - A14370E500BCD2443559DB70F2786EB6 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; - A1ADB924FB5616647988483D4A2F8229 /* PetstoreClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PetstoreClient-Info.plist"; sourceTree = ""; }; - A1C5824ADAF044284DC74D7785926F01 /* CatAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - A2062FC5CF8950D95726336DA1F1F52C /* DogAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = DogAllOf.md; path = docs/DogAllOf.md; sourceTree = ""; }; - A2C8922E4E1E3C67279458D892BC37AD /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = PetstoreClient/Classes/OpenAPIs/Configuration.swift; sourceTree = ""; }; - A2EDBEFED12864758CCA6F411205AB2E /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; - A403B12907B25FC32930C07AD4DF4600 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - A4218AB53A6385BB02D95ED58A63B6AB /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - A5F4524003B8CAF5944F3FD37875D795 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - A6DF985F6F04F63AA4A9AE7866CB8D22 /* FakeAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - A71552570D704D50ABA564EB978406FA /* OuterEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - A8383047D766DF909F58645FCCF42048 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - A933D6B3F16C58A90BFD589C4B23EE38 /* EnumTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - AA9CEE837EF5EE1215788BEBC3959479 /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; - AB1FE5BDED74EBDC047C5B437A524854 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - AB9FF8F32D5D6FC16033AF34AC1408FD /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - ACC20A8939D21B502E71D99F130B013E /* NumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - AE110F03859CEB598ADBC6AF0026E6C6 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - AE55486083AAFB05A421910D689676CD /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = PetstoreClient/Classes/OpenAPIs/APIHelper.swift; sourceTree = ""; }; - AE9C5D5D818389294D9B773DD491B146 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - AEF2F44C17F277967404CE3DA788FD46 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - AF5C3CBAA31C59F82C8DE03C448B79D8 /* Order.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Order.md; path = docs/Order.md; sourceTree = ""; }; - B048D2348C3086D80D00537EC372C755 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - B18AB9B87BF0A071727872B64CC84137 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - B22AF668079FC82298B5D800D6E575BB /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - B23D0E4BD36D6E24C66A8DB3F81FE656 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - B29AE35CD92E0CB3A64D2E581DAD2CB4 /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; - B2BC0F91A33991D668BEC3583CF46BAB /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; - B374449845CA94813BACD80BE4751992 /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - B3B003673B45236AA5A51A70A733399D /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; - B3DC61667E570A41266B09E2160DAF2D /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - B498E7AFBD0589628B31BD16154B20FF /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - B50B0F2486C6BB7F3AF76CD685C8B4E1 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - B52D5D8ED9723274361CA73BDC3875A0 /* FileSchemaTestClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = FileSchemaTestClass.md; path = docs/FileSchemaTestClass.md; sourceTree = ""; }; - B5A26ADF8B68902A509D1A52E825E595 /* Pet.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Pet.md; path = docs/Pet.md; sourceTree = ""; }; - B5D0270A8CD4CA80B74E5EC729FBC1A7 /* DeprecationWarner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DeprecationWarner.swift; path = Platform/DeprecationWarner.swift; sourceTree = ""; }; - B68A320DEB52A0B2CF5A7DCD714E84D3 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - B6DFB261890C61E9C5ED205C350432C6 /* DogAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - BAED0C18FF2FC7D97F0E5B2D4FE37F2C /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; - BB2944F75CA2FADBE47B2326252AAB5A /* EnumArrays.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - BC49CD3902CF252FAA732A1DDA1DC1C9 /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; - BD2133B0A357172D4E12A35C6488638D /* Model200Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - BDE1B1C73CF83B02289A255C14E108C9 /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - BE02647BBDB83E0D48469A56FBF37C88 /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; - BE1E7C2852E09D117ECDA841F0A5CE03 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BE6232D0F85A4EF002139921CBA82C3F /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - BE64C63DA4FB40ACE396982AAB244DC0 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - BE70B57B6CF22A99EBDA453C12741148 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; - BF174B49C2E16DD172055DB12BC37B2F /* SpecialModelName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - C2ABFCCD850DDE628412E12A3A36BC83 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; - C308A93504B6AE628F892297A6EDD347 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - C3633BEF1B1742609980D8C0500E4519 /* Client.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Client.md; path = docs/Client.md; sourceTree = ""; }; - C3FFE137AD3E253AC3CC98BDB629E1CC /* PetstoreClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PetstoreClient-dummy.m"; sourceTree = ""; }; - C54917ABF2432A86A6CCB0EABE76F916 /* Animal.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Animal.md; path = docs/Animal.md; sourceTree = ""; }; - C5A7024FF197192803FBC9F7CEFD9C87 /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - C5FFB8448F56996188428783F8C6C98F /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - C638F1FAA7FFA890ACB0BAD594BAA07B /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; - C645ED7A39D8B9114C20CAFE2B7FBC2B /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireImplementations.swift; path = PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift; sourceTree = ""; }; - C692DE62E3C756A61E2E9C829EA0BCE6 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - C71AEC0AF13D31F11719E203832081AF /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; - C745F77F676CBAE7E68106481E9DF4B9 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - C894BEC0DE9A446CBB01A0B7D63DA38A /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; - C89F6DBCB4EBE505168C934C00DB909D /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - CB268230F2A96F71335E107E497BC32C /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; - CB834FF7C5DF4A05EB6179428E1A2D30 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - CD714B38F6C265C97287CD6F713F3398 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - CF92C4858F759EABBDDB45D32BE8DDC2 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClientTests-acknowledgements.markdown"; sourceTree = ""; }; - D10F2A3D1BBD10CA8594739DB19CDC07 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = ""; }; - D1E589B3714F15E207FD32CD6EC52305 /* RxSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxSwift-Info.plist"; sourceTree = ""; }; - D25BFF9CA1B3C8219A5F2A1C064AA6AA /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; - D335B34B9871B74E10984781CC371CBA /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - D406BAD811EAD0952929B093F56F2BF2 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = ""; }; - D49FDF34DAD7FA627C657B59EEF5348A /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - D69932FBD99A6AC9733077CD793DE95E /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D73E4AE40107F9E12D9933657017209A /* Cat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - D765DC1CA9E827C5C155427A9C020AF8 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - D7FBBD15C7EDE32F75E84BF63C4A0093 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - D8ED3568E09862ADC85A6FE650FEC665 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - D95243E9789D171D24B3CCEF4A306E79 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; - D95AD1D226C3858D35BDFD664BBFCC02 /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - D98CA687BDA7E1DE6C6D098CFD6AE1C7 /* StoreAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StoreAPI.md; path = docs/StoreAPI.md; sourceTree = ""; }; - DBD0EFE5168A6526DB06F4A6800CF584 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - DCD118360416984364D92CA81D410FC2 /* Model200Response.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Model200Response.md; path = docs/Model200Response.md; sourceTree = ""; }; - DDC303FBE481D915EC0B8ADDAE1623CB /* CatAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = CatAllOf.md; path = docs/CatAllOf.md; sourceTree = ""; }; - DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - DF1DD94A10F409B4316DAC2A019FED34 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - E1259C7EE8FBB3A324ED66A0FBE292D2 /* EnumClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - E22F3BDA0C336074E5EA13F37C05FF2C /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; - E237960AB17F68A30227D83025D39488 /* List.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - E3B9412BBCE6A74BC742A54FD0B8186C /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; - E57A9C76D05E7DF25E045C8C83CF7B8C /* File.md */ = {isa = PBXFileReference; includeInIndex = 1; name = File.md; path = docs/File.md; sourceTree = ""; }; - E708A153C22A9339B8145278E89E64D8 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - E7AE50AD71DB17321FA5240F1B1D2E70 /* AnimalFarm.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AnimalFarm.md; path = docs/AnimalFarm.md; sourceTree = ""; }; - E9ABCE94A0D10DF97FC367C061436E5F /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - EA01D2A2DB1E31168FFF75C6F9DAD5C5 /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; - EAFD9A5AE325CD48442A611EFD103D57 /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; - EC22F330006EA5F892970C69FBA9F199 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - ED1332D9E071ED0D532F6ACD2AD1AC38 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; - EDB38B126A5C5BA3195B41CDA7E3F6A3 /* EnumArrays.md */ = {isa = PBXFileReference; includeInIndex = 1; name = EnumArrays.md; path = docs/EnumArrays.md; sourceTree = ""; }; - EFA2A0B903691A7C2293FD13EACB8E3F /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; - F1577EF84ADE20D7F04CD82D5BAA684B /* User.md */ = {isa = PBXFileReference; includeInIndex = 1; name = User.md; path = docs/User.md; sourceTree = ""; }; - F1FC53345CBCE9EF88576C6BDC5D16EE /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; - F25DE89C483E14ED16E9B0F96850BF3B /* ArrayTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F2E147BD28F065756948CC15F0E6B68D /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; - F3A9349CCCD01B8CD6646B22BD8FAFFD /* AnimalFarm.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - F42B2C25A2A499E0244E107DF28BA640 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; - F4546CAE8AC2D5BD71A14E476145C771 /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; - F53E66F85590280D11F64545A178CC13 /* StringBooleanMap.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StringBooleanMap.md; path = docs/StringBooleanMap.md; sourceTree = ""; }; - F5CF777F69E934A92F78512092C53052 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - F6BAA110BD7DD59D40985519BC3BAB2C /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; - F73E2FE9C0296B7647E36FDAB1A48E6E /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - F8D5778A0684580BB744D394024BB4A6 /* Return.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Return.md; path = docs/Return.md; sourceTree = ""; }; - F8E5B43302C88640C1A05762A037012A /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; - F9FDC7E72AC896C5D9031E49B0372D06 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - FB54B43833CB03F1D8749CE7C298D3B5 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - FB709FAE1018A60657705217C88967AC /* TypeHolderExample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - FBF9232381581A50CA2E8FA9517D76EB /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; - FC35E81B52795E7CB75A8D1E9687BF16 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - FC82F67A5B34D020108D89B64C3BD691 /* SpecialModelName.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SpecialModelName.md; path = docs/SpecialModelName.md; sourceTree = ""; }; - FD2207283F6AAB87403F6CC48462589C /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - FE0D448C7D74BFFB8604285DD7047EED /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - FEFFBEEA8F7216DF65BD978A823BEDA2 /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - FF4EA9F3121FB3144A5648BBC0A8004D /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; - FF699627254D1F4E425E37E0306B828B /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9C5D10FD5C4D12FBA9AF8DE73A0476D4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 400710E3FF438CDC18E6D19C8E64E0D0 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BFF25BADA4BDAAF2C33C2AB4B7CC18DF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 02D5452095EF961AABF5EC9484D6700F /* Alamofire.framework in Frameworks */, - BDEA420ADE6E58BFDB87E1339C6EF292 /* Foundation.framework in Frameworks */, - 3CB84F06C826903645D046E00A08E94B /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6B598CD6C3665D587BD8EDE6202EA593 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E44363F6A0C4B876C2CE0C89617F4A74 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 00EA7C74AF31550D150A68EC1DB4885A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BD1DAFE1F3E6C9E4EB0F2099B6D6FA2 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0EFA4421D8D59E9E4A8C8A50F313B3C5 /* Support Files */ = { - isa = PBXGroup; - children = ( - 9D597D60E3BD5AEA174D24F7409820EB /* RxSwift.modulemap */, - BE6232D0F85A4EF002139921CBA82C3F /* RxSwift.xcconfig */, - 2F77FDC4F04FEF422ACDCD587C512559 /* RxSwift-dummy.m */, - D1E589B3714F15E207FD32CD6EC52305 /* RxSwift-Info.plist */, - 0723F133C41FD08232F74124D0E3FC2E /* RxSwift-prefix.pch */, - 4B22542F5E9A061C9F6214D75923635D /* RxSwift-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; - sourceTree = ""; - }; - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */ = { - isa = PBXGroup; - children = ( - ADB072EBDA2441CFD03AE3EE4E9CFE92 /* PetstoreClient */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 262AD758FCFC71C597EE703E744E279A /* Alamofire */ = { - isa = PBXGroup; - children = ( - CD714B38F6C265C97287CD6F713F3398 /* AFError.swift */, - C745F77F676CBAE7E68106481E9DF4B9 /* Alamofire.swift */, - 4C008FB60F065D079DB1F0C69B60DDEA /* DispatchQueue+Alamofire.swift */, - D335B34B9871B74E10984781CC371CBA /* MultipartFormData.swift */, - A8383047D766DF909F58645FCCF42048 /* NetworkReachabilityManager.swift */, - 39AE2AD9A01457ED8AC57D692A5F40AD /* Notifications.swift */, - 86A0FB6358543AEAB83BC45DD397D732 /* ParameterEncoding.swift */, - 720601B930B8E6FB3B449B0C3EFB451F /* Request.swift */, - D7FBBD15C7EDE32F75E84BF63C4A0093 /* Response.swift */, - 95300CC9035C5766B62FE4FB54FA5951 /* ResponseSerialization.swift */, - E708A153C22A9339B8145278E89E64D8 /* Result.swift */, - 9A56088E87A9AACE94749A936B309080 /* ServerTrustPolicy.swift */, - 378449150E818606AADBD6FB5A562D0D /* SessionDelegate.swift */, - 02C7203E47628DD3832410EEA16A1D8B /* SessionManager.swift */, - 575E60871C2A868C6B6D235B2DE25D83 /* TaskDelegate.swift */, - B22AF668079FC82298B5D800D6E575BB /* Timeline.swift */, - 51BEBD9500775258E10801B2D4636130 /* Validation.swift */, - 8342B3C0D5B5B78B6FF2EB9EBABDF316 /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */, - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 2F357899B70BCB34F071EB6F4C420F2E /* Support Files */ = { - isa = PBXGroup; - children = ( - 928B725115295804C613BD7C865C8201 /* PetstoreClient.modulemap */, - 28DB89F2024F2DDD08AE89C3006D009E /* PetstoreClient.xcconfig */, - C3FFE137AD3E253AC3CC98BDB629E1CC /* PetstoreClient-dummy.m */, - A1ADB924FB5616647988483D4A2F8229 /* PetstoreClient-Info.plist */, - 2B2AAC902CD2815AAAFD57064F19AB84 /* PetstoreClient-prefix.pch */, - F4546CAE8AC2D5BD71A14E476145C771 /* PetstoreClient-umbrella.h */, - ); - name = "Support Files"; - path = "SwaggerClientTests/Pods/Target Support Files/PetstoreClient"; - sourceTree = ""; - }; - 6C5DB4246A4C5DB39B520841339F1173 /* Pods */ = { - isa = PBXGroup; - children = ( - 262AD758FCFC71C597EE703E744E279A /* Alamofire */, - D5E8828356ABA3B9CC63A755C69FA492 /* RxSwift */, - ); - name = Pods; - sourceTree = ""; - }; - 752761252CF779269D588A7735D3E8BD /* Products */ = { - isa = PBXGroup; - children = ( - 6EDF3214C286AFD4841B3551A037B0A9 /* Alamofire.framework */, - D69932FBD99A6AC9733077CD793DE95E /* PetstoreClient.framework */, - 0F39AA54BB1773329C8151B721ED0D09 /* Pods_SwaggerClient.framework */, - 6F9F8165FD8B1C4B07F06F5DCDDDE89A /* Pods_SwaggerClientTests.framework */, - BE1E7C2852E09D117ECDA841F0A5CE03 /* RxSwift.framework */, - ); - name = Products; - sourceTree = ""; - }; - 76FC95CAFD3F67C42393B89FE11C631E /* Models */ = { - isa = PBXGroup; - children = ( - 7628A653BCE0CE4F0CA24E4699FF04E5 /* AdditionalPropertiesAnyType.swift */, - 9D53702B1DFE795F10CD9F02ED7196FB /* AdditionalPropertiesArray.swift */, - 9A9D6B8A244BC24B1DFF8AE87F94F792 /* AdditionalPropertiesBoolean.swift */, - AE9C5D5D818389294D9B773DD491B146 /* AdditionalPropertiesClass.swift */, - CB268230F2A96F71335E107E497BC32C /* AdditionalPropertiesInteger.swift */, - C2ABFCCD850DDE628412E12A3A36BC83 /* AdditionalPropertiesNumber.swift */, - 427485D09ADF908E73C20C8E8F56313E /* AdditionalPropertiesObject.swift */, - 417E0C1C7F4C17857E4C0D19275C6973 /* AdditionalPropertiesString.swift */, - 2E62E4A381F97286B84952D8ABA59681 /* Animal.swift */, - F3A9349CCCD01B8CD6646B22BD8FAFFD /* AnimalFarm.swift */, - 0755658D38EA295B964DD3D2AE6130E8 /* ApiResponse.swift */, - 59A65FEE7BCD66D95A4A236D44082214 /* ArrayOfArrayOfNumberOnly.swift */, - 97AE2157FA464312716D670ACC5FBA81 /* ArrayOfNumberOnly.swift */, - F25DE89C483E14ED16E9B0F96850BF3B /* ArrayTest.swift */, - 39F74B8F482952B4F0D1ECBE5D900E09 /* Capitalization.swift */, - D73E4AE40107F9E12D9933657017209A /* Cat.swift */, - A1C5824ADAF044284DC74D7785926F01 /* CatAllOf.swift */, - 7239C4B748D482C26AE3B3EC168AD371 /* Category.swift */, - 8E271F2E357A3F1A972FF120671638B4 /* ClassModel.swift */, - 77E4025C4EF246541D617C626370FC16 /* Client.swift */, - 88BE3C1FFB1B8A373D68AFE8E2CE9E5B /* Dog.swift */, - B6DFB261890C61E9C5ED205C350432C6 /* DogAllOf.swift */, - BB2944F75CA2FADBE47B2326252AAB5A /* EnumArrays.swift */, - E1259C7EE8FBB3A324ED66A0FBE292D2 /* EnumClass.swift */, - A933D6B3F16C58A90BFD589C4B23EE38 /* EnumTest.swift */, - 47729A51DD7F47ED910F54FB3FBE5393 /* File.swift */, - 9ECAC6F788B1B30D9157D0A0ADC1148B /* FileSchemaTestClass.swift */, - 8E7E635C33CF3DE53B838B378535F65C /* FormatTest.swift */, - A403B12907B25FC32930C07AD4DF4600 /* HasOnlyReadOnly.swift */, - E237960AB17F68A30227D83025D39488 /* List.swift */, - 40FA27876F7533BCDAAEB14AED6CC511 /* MapTest.swift */, - D406BAD811EAD0952929B093F56F2BF2 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - BD2133B0A357172D4E12A35C6488638D /* Model200Response.swift */, - FEFFBEEA8F7216DF65BD978A823BEDA2 /* Name.swift */, - ACC20A8939D21B502E71D99F130B013E /* NumberOnly.swift */, - 87ADA33E38CF943875922CB316D2A29A /* Order.swift */, - 75E2A26619203BE094E23132BE4F9C6D /* OuterComposite.swift */, - A71552570D704D50ABA564EB978406FA /* OuterEnum.swift */, - 32DEB152EA23784FF891FB3850E4A1FE /* Pet.swift */, - B23D0E4BD36D6E24C66A8DB3F81FE656 /* ReadOnlyFirst.swift */, - 0568635049F72DE8DD05757186436324 /* Return.swift */, - BF174B49C2E16DD172055DB12BC37B2F /* SpecialModelName.swift */, - 0757CDB69F181DE86D31F260259CC63B /* StringBooleanMap.swift */, - 8688291EDCC3CA07AEFAFFDC3ABBE224 /* Tag.swift */, - C692DE62E3C756A61E2E9C829EA0BCE6 /* TypeHolderDefault.swift */, - FB709FAE1018A60657705217C88967AC /* TypeHolderExample.swift */, - B374449845CA94813BACD80BE4751992 /* User.swift */, - 46FC0AD10406C3CE1828C826775E9650 /* XmlItem.swift */, - ); - name = Models; - path = PetstoreClient/Classes/OpenAPIs/Models; - sourceTree = ""; - }; - 8244AEBEFB4AC3530215FA5CBA26673B /* Pods-SwaggerClient */ = { - isa = PBXGroup; - children = ( - 618C90E6044C36C76F3590183ED38CB2 /* Pods-SwaggerClient.modulemap */, - D46742F1F99243487DCC614C75C1413C /* Pods-SwaggerClient-acknowledgements.markdown */, - 96FB30FE91CE11061D85EA6BDBE094E3 /* Pods-SwaggerClient-acknowledgements.plist */, - 471C1EEE2C56B756E004285EACEE72E2 /* Pods-SwaggerClient-dummy.m */, - 9448B03916DFC494CD68A614565A98B8 /* Pods-SwaggerClient-frameworks.sh */, - 4DC5DC2F9BCEFA797895B33C16D2B17E /* Pods-SwaggerClient-Info.plist */, - 2ED73BB76003B470F3B646AD3A5750D4 /* Pods-SwaggerClient-umbrella.h */, - 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */, - B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */, - ); - name = "Pods-SwaggerClient"; - path = "Target Support Files/Pods-SwaggerClient"; - sourceTree = ""; - }; - 8342B3C0D5B5B78B6FF2EB9EBABDF316 /* Support Files */ = { - isa = PBXGroup; - children = ( - 353DE1A4F630D656323F08E7DBB62F93 /* Alamofire.modulemap */, - 4FB24B4936663207D1E346C5B6B9EAD4 /* Alamofire.xcconfig */, - 2F4CC7E2EF21164D2E203FEAF12D869A /* Alamofire-dummy.m */, - FD2207283F6AAB87403F6CC48462589C /* Alamofire-Info.plist */, - D49FDF34DAD7FA627C657B59EEF5348A /* Alamofire-prefix.pch */, - AE110F03859CEB598ADBC6AF0026E6C6 /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - 86B1F48A58BFA2FA26CD584937FBEED1 /* Pods-SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - D1A6BA19B108998DF7350B40C83BFC47 /* Pods-SwaggerClientTests.modulemap */, - D01ADEDF5E44D58ACB8ED1AED7BF7615 /* Pods-SwaggerClientTests-acknowledgements.markdown */, - 31ED5C3525921534592BF796A9C159CF /* Pods-SwaggerClientTests-acknowledgements.plist */, - 4C2B15F359D7B06184AED746FB653F10 /* Pods-SwaggerClientTests-dummy.m */, - 901441DA8E39EF973EBE8D69C2CDADE7 /* Pods-SwaggerClientTests-Info.plist */, - 4FCA64AB7A1C3014939EFADD6F937DB1 /* Pods-SwaggerClientTests-umbrella.h */, - CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */, - 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = "Pods-SwaggerClientTests"; - path = "Target Support Files/Pods-SwaggerClientTests"; - sourceTree = ""; - }; - 87C875AAE46C42F388F84017D9C9F70E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 110A71E71814850BBCD440AF198317DF /* Alamofire.framework */, - 0FDDD670EFAE8A21A0BD76C684193FAE /* RxSwift.framework */, - EA9AC0BC3CFB1D7F35089B6086FA77D8 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - ADB072EBDA2441CFD03AE3EE4E9CFE92 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - C645ED7A39D8B9114C20CAFE2B7FBC2B /* AlamofireImplementations.swift */, - AE55486083AAFB05A421910D689676CD /* APIHelper.swift */, - 55A64F269657828EFCFE8BFEBEC769FC /* APIs.swift */, - 35FACC9017B95B9A2C4A6F43E6168BE3 /* CodableHelper.swift */, - A2C8922E4E1E3C67279458D892BC37AD /* Configuration.swift */, - 892F30771518EB494D89A92413C04E85 /* Extensions.swift */, - 0440E1381A0610C4FE76AA2AF1814289 /* JSONEncodableEncoding.swift */, - 8308F433372AEFC6D557F1856FC9DA01 /* JSONEncodingHelper.swift */, - 28350F99E9985C0EFD64D72D74A3BB5B /* Models.swift */, - B0F1355E884BA38BE356E5B3F34C7552 /* APIs */, - 76FC95CAFD3F67C42393B89FE11C631E /* Models */, - E43B365D3A2A9F7299C0632875837341 /* Pod */, - 2F357899B70BCB34F071EB6F4C420F2E /* Support Files */, - ); - name = PetstoreClient; - path = ../..; - sourceTree = ""; - }; - B0F1355E884BA38BE356E5B3F34C7552 /* APIs */ = { - isa = PBXGroup; - children = ( - 89D4EF25430724C9CA591320E91F6ADE /* AnotherFakeAPI.swift */, - A6DF985F6F04F63AA4A9AE7866CB8D22 /* FakeAPI.swift */, - DF1DD94A10F409B4316DAC2A019FED34 /* FakeClassnameTags123API.swift */, - 3C12C50651DC7C8FE70BC93359C255DF /* PetAPI.swift */, - 387EBB01DADD396614945A01970A8222 /* StoreAPI.swift */, - 342554F69C1610DDADF3EBAC284CC8F6 /* UserAPI.swift */, - ); - name = APIs; - path = PetstoreClient/Classes/OpenAPIs/APIs; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 1C8221FE0071BDA2D0C5DE07B7736E88 /* Development Pods */, - 87C875AAE46C42F388F84017D9C9F70E /* Frameworks */, - 6C5DB4246A4C5DB39B520841339F1173 /* Pods */, - 752761252CF779269D588A7735D3E8BD /* Products */, - 27EB02841E0D43820F14F4377DE3547E /* Targets Support Files */, - ); - sourceTree = ""; - }; - D5E8828356ABA3B9CC63A755C69FA492 /* RxSwift */ = { - isa = PBXGroup; - children = ( - 64F819D835354426411C22FB35823EAD /* AddRef.swift */, - 7F4E8DC898B4C8D35F09B107CE705172 /* Amb.swift */, - D8ED3568E09862ADC85A6FE650FEC665 /* AnonymousDisposable.swift */, - B3DC61667E570A41266B09E2160DAF2D /* AnonymousObserver.swift */, - 7AB42A286E75A2848A769570F01DAC24 /* AnyObserver.swift */, - F6BAA110BD7DD59D40985519BC3BAB2C /* AsMaybe.swift */, - C638F1FAA7FFA890ACB0BAD594BAA07B /* AsSingle.swift */, - 8D44154CE37C1B66CDC3D69453887262 /* AsyncLock.swift */, - 452FB9512A491F731556BD2F110347ED /* AsyncSubject.swift */, - 2C7E8D8382CCB07D68866B995A900D74 /* AtomicInt.swift */, - 9289A1C05392D4FF88A897B4FDF77958 /* Bag.swift */, - FF699627254D1F4E425E37E0306B828B /* Bag+Rx.swift */, - 10A297E0A593ED4485BF3BAA9211E812 /* BehaviorSubject.swift */, - 4C42EB9688F37F35C9110C57A8075DC4 /* BinaryDisposable.swift */, - 28DE248049BE51CEA8ED1544F9D7FE9E /* BooleanDisposable.swift */, - 49A9E858642895322172FF16226C86AC /* Buffer.swift */, - 5A8B9F6DB3E903DC9635F9DA16D90A0C /* Cancelable.swift */, - 49E9CEC3564840C6531A01B3402A3A12 /* Catch.swift */, - 54212BBF40F065FC93C168C875E2E209 /* CombineLatest.swift */, - D25BFF9CA1B3C8219A5F2A1C064AA6AA /* CombineLatest+arity.swift */, - 7B49FF45429D57DA0487C5BD90AA6398 /* CombineLatest+Collection.swift */, - 0ACE6B378AD271E3ECC20C3EB267F4D8 /* Completable.swift */, - BC49CD3902CF252FAA732A1DDA1DC1C9 /* Completable+AndThen.swift */, - 410ED99EC03614CF82F7E2CCD4E628AF /* CompositeDisposable.swift */, - C71AEC0AF13D31F11719E203832081AF /* Concat.swift */, - D95AD1D226C3858D35BDFD664BBFCC02 /* ConcurrentDispatchQueueScheduler.swift */, - D765DC1CA9E827C5C155427A9C020AF8 /* ConcurrentMainScheduler.swift */, - AB1FE5BDED74EBDC047C5B437A524854 /* ConnectableObservableType.swift */, - 32615BCCDB0302A683583113699C168B /* Create.swift */, - B18AB9B87BF0A071727872B64CC84137 /* CurrentThreadScheduler.swift */, - 62326983DDFE0858FB48A88B024EAE9D /* Debounce.swift */, - BE02647BBDB83E0D48469A56FBF37C88 /* Debug.swift */, - 27F63D218F3E7685156696F53CEAB647 /* DefaultIfEmpty.swift */, - FBF9232381581A50CA2E8FA9517D76EB /* Deferred.swift */, - 8CFB12945932D18A9721B6AF2D8D871E /* Delay.swift */, - 13431ED497EC52994DA35A8DD3CB5C3C /* DelaySubscription.swift */, - 9F929FCCF076F0A692EA809B17DD7F31 /* Dematerialize.swift */, - B498E7AFBD0589628B31BD16154B20FF /* Deprecated.swift */, - B5D0270A8CD4CA80B74E5EC729FBC1A7 /* DeprecationWarner.swift */, - 679C1F8FF956155F71A31E63595C9AB9 /* DispatchQueue+Extensions.swift */, - 321D200CF6D488D976163C6A790DB8AA /* DispatchQueueConfiguration.swift */, - FC35E81B52795E7CB75A8D1E9687BF16 /* Disposable.swift */, - C5FFB8448F56996188428783F8C6C98F /* Disposables.swift */, - 40D138874AFF1185A99996B4180C5AAB /* DisposeBag.swift */, - 8E3B161DE103995FAFA429C1AD3E2875 /* DisposeBase.swift */, - 43029CD91769D491E685263C4CB46A97 /* DistinctUntilChanged.swift */, - 45C4BA95A0FC85CD30E5DD59545AF87F /* Do.swift */, - 6F10D694F6B9493FDA575E60FE695722 /* ElementAt.swift */, - B3B003673B45236AA5A51A70A733399D /* Empty.swift */, - EAFD9A5AE325CD48442A611EFD103D57 /* Enumerated.swift */, - 979ECDDE99CE790DA21FE87298107E6B /* Error.swift */, - F73E2FE9C0296B7647E36FDAB1A48E6E /* Errors.swift */, - 14D946B2CD75D612D3AE3F72880C7FF3 /* Event.swift */, - 291E627729F653AC7E4BAB6FEDE416E3 /* Filter.swift */, - B29AE35CD92E0CB3A64D2E581DAD2CB4 /* First.swift */, - F8E5B43302C88640C1A05762A037012A /* Generate.swift */, - 77CBC56217930F052D637B82D048BA3F /* GroupBy.swift */, - 0FA93D91962228BFC4F2058578D7A9EB /* GroupedObservable.swift */, - 2BF070C783A6786C9C92AA917E9AC879 /* HistoricalScheduler.swift */, - AB9FF8F32D5D6FC16033AF34AC1408FD /* HistoricalSchedulerTimeConverter.swift */, - 44F10FFC1F6C0F6A0F7C003C038C272B /* ImmediateSchedulerType.swift */, - C308A93504B6AE628F892297A6EDD347 /* InfiniteSequence.swift */, - 305616479EFCF33CB4768627955493AB /* InvocableScheduledItem.swift */, - CB834FF7C5DF4A05EB6179428E1A2D30 /* InvocableType.swift */, - D95243E9789D171D24B3CCEF4A306E79 /* Just.swift */, - C89F6DBCB4EBE505168C934C00DB909D /* Lock.swift */, - F5CF777F69E934A92F78512092C53052 /* LockOwnerType.swift */, - 7EC9D77DAB6AE650C74E828CE1557C00 /* MainScheduler.swift */, - 5FF198528C6AE20A99A5E33F76D0C527 /* Map.swift */, - C894BEC0DE9A446CBB01A0B7D63DA38A /* Materialize.swift */, - A14370E500BCD2443559DB70F2786EB6 /* Maybe.swift */, - FF4EA9F3121FB3144A5648BBC0A8004D /* Merge.swift */, - 79A4D30F2478E26FEA80A716FA038512 /* Multicast.swift */, - 498E9106F2911C5C575288660EF2C14A /* Never.swift */, - A5F4524003B8CAF5944F3FD37875D795 /* NopDisposable.swift */, - DBD0EFE5168A6526DB06F4A6800CF584 /* Observable.swift */, - BE64C63DA4FB40ACE396982AAB244DC0 /* ObservableConvertibleType.swift */, - 8D048EFF0C58F0BC4BBC956A98937739 /* ObservableType.swift */, - 5B6C60D7E233892084DAC43F60C64C60 /* ObservableType+Extensions.swift */, - 47A00016C4275D6E28A1DD5AD98AC9AE /* ObservableType+PrimitiveSequence.swift */, - 274B9D4CA658622B79DCE0F5E736A061 /* ObserveOn.swift */, - FB54B43833CB03F1D8749CE7C298D3B5 /* ObserverBase.swift */, - 0D4584BAE72539FDF3D31787762B39D0 /* ObserverType.swift */, - E9ABCE94A0D10DF97FC367C061436E5F /* OperationQueueScheduler.swift */, - 2CD8220D45545AC2A21A066A562081FF /* Optional.swift */, - 80EBCAEF4DEEB18B34DC5033FF20ECA8 /* Platform.Darwin.swift */, - 27B1CB7693D74DF7AB61FB3A0064A532 /* Platform.Linux.swift */, - 7B990C87BD5B32BF54E420212C1A52B1 /* PrimitiveSequence.swift */, - 8C65830349B23D7E262AB27BAB0E8188 /* PrimitiveSequence+Zip+arity.swift */, - 7C8CB70C6C6B09D4BB90057C9BA7EEC2 /* PriorityQueue.swift */, - F2E147BD28F065756948CC15F0E6B68D /* Producer.swift */, - 09F1E9D95E719B94DD98DDDB394278F2 /* PublishSubject.swift */, - 60E9C1BF2A5AAD8532B83D587D4B447A /* Queue.swift */, - 46285A50499BCD564104AE4AD8489A48 /* Range.swift */, - 240EE4633A0C295594350E7EC54BA3DF /* Reactive.swift */, - 55000F129FE5A09A0B51661892DB1F4E /* RecursiveLock.swift */, - B68A320DEB52A0B2CF5A7DCD714E84D3 /* RecursiveScheduler.swift */, - 060AAA21729D90B11F6FD9102F628758 /* Reduce.swift */, - 1555637002FBEDE13C94AEA5F61C763B /* RefCountDisposable.swift */, - 2EAED007F778FE48F4D3EB2B398B0AFB /* Repeat.swift */, - AEF2F44C17F277967404CE3DA788FD46 /* ReplaySubject.swift */, - E22F3BDA0C336074E5EA13F37C05FF2C /* RetryWhen.swift */, - B50B0F2486C6BB7F3AF76CD685C8B4E1 /* Rx.swift */, - 2CEA210E8205F311B1A19569BCDDEF63 /* RxMutableBox.swift */, - 192DC760893AF9295AD26599EF40763D /* Sample.swift */, - 8942B778DC2EC96252BBB267B62D566B /* Scan.swift */, - 717C1608162B27019EBC04A33444BAEE /* ScheduledDisposable.swift */, - FE0D448C7D74BFFB8604285DD7047EED /* ScheduledItem.swift */, - 9FBF81FDC5C51FD450958591E8EAF6EA /* ScheduledItemType.swift */, - F9FDC7E72AC896C5D9031E49B0372D06 /* SchedulerServices+Emulation.swift */, - 33796A172718E1356E0E8337BAE01CD2 /* SchedulerType.swift */, - 4B5420BA5CD952DA0D4A8A31E4D69CC2 /* Sequence.swift */, - CF92C4858F759EABBDDB45D32BE8DDC2 /* SerialDispatchQueueScheduler.swift */, - 55B63E482462E54A5366DAEA6318FB7E /* SerialDisposable.swift */, - EA01D2A2DB1E31168FFF75C6F9DAD5C5 /* ShareReplayScope.swift */, - AA9CEE837EF5EE1215788BEBC3959479 /* Single.swift */, - BDE1B1C73CF83B02289A255C14E108C9 /* SingleAssignmentDisposable.swift */, - ED1332D9E071ED0D532F6ACD2AD1AC38 /* SingleAsync.swift */, - BE70B57B6CF22A99EBDA453C12741148 /* Sink.swift */, - F1FC53345CBCE9EF88576C6BDC5D16EE /* Skip.swift */, - 25B4A2E0DAA89840BB58C5D472574F66 /* SkipUntil.swift */, - A2EDBEFED12864758CCA6F411205AB2E /* SkipWhile.swift */, - 836ADD02498B971DAA473321782A72A0 /* StartWith.swift */, - 2788B53C02374D910EFFBCF48BFF0B1D /* String+Rx.swift */, - C5A7024FF197192803FBC9F7CEFD9C87 /* SubjectType.swift */, - 70180A07F00266A41D515742CBA72B74 /* SubscribeOn.swift */, - A4218AB53A6385BB02D95ED58A63B6AB /* SubscriptionDisposable.swift */, - D10F2A3D1BBD10CA8594739DB19CDC07 /* SwiftSupport.swift */, - BAED0C18FF2FC7D97F0E5B2D4FE37F2C /* Switch.swift */, - 97D7A50019AFFCCD39301BD1E594F91C /* SwitchIfEmpty.swift */, - 0AF5386FC035BD7FBDA0B02884DE8324 /* SynchronizedDisposeType.swift */, - 757C5919A405D111AADAF18AFDDD9D5A /* SynchronizedOnType.swift */, - EC22F330006EA5F892970C69FBA9F199 /* SynchronizedUnsubscribeType.swift */, - 19A8FEF66E4D85F1B100E0AD77AC60B1 /* TailRecursiveSink.swift */, - 8050204E8821E9A399D7E830591E063B /* Take.swift */, - 57C559BAD8B2B8C949DA1C1837C049C6 /* TakeLast.swift */, - 0027A132D8BB718973989368CF5E63CF /* TakeUntil.swift */, - 6E67D2FEF499445214AF84B7B9C9B33E /* TakeWhile.swift */, - 6DB4CEA0C0A7C4823A04EAD9FBA3961D /* Throttle.swift */, - F42B2C25A2A499E0244E107DF28BA640 /* Timeout.swift */, - 98C736C5D0850FA27DB5D0E58640C537 /* Timer.swift */, - 33FB85D186079ED93696702AD931FFDA /* ToArray.swift */, - 459E274832813076884CA4287E491429 /* Using.swift */, - 745314207D827581C481CE38F4AEB7A3 /* VirtualTimeConverterType.swift */, - 6DA209283C4EBF0544FF63C7D1BCC40D /* VirtualTimeScheduler.swift */, - EFA2A0B903691A7C2293FD13EACB8E3F /* Window.swift */, - B2BC0F91A33991D668BEC3583CF46BAB /* WithLatestFrom.swift */, - E3B9412BBCE6A74BC742A54FD0B8186C /* Zip.swift */, - 5076FFA46D2287FC8EC0C217FC4BA0B7 /* Zip+arity.swift */, - 65FF8529B526BB8EC9A7CB5716CEB89F /* Zip+Collection.swift */, - 0EFA4421D8D59E9E4A8C8A50F313B3C5 /* Support Files */, - ); - name = RxSwift; - path = RxSwift; - sourceTree = ""; - }; - E43B365D3A2A9F7299C0632875837341 /* Pod */ = { - isa = PBXGroup; - children = ( - 7D2AE1A0BBE6459478A73D38848B588E /* AdditionalPropertiesClass.md */, - C54917ABF2432A86A6CCB0EABE76F916 /* Animal.md */, - E7AE50AD71DB17321FA5240F1B1D2E70 /* AnimalFarm.md */, - 4F8AC481F02DAF666B64D9A62FA7109F /* AnotherFakeAPI.md */, - 97CEA1BED002ABF0D6E5E078FB3F5895 /* ApiResponse.md */, - 55D378FA7C24F905373016C59B3BE2C4 /* ArrayOfArrayOfNumberOnly.md */, - 0AB84B97D3A773262405DAE614E8AAC8 /* ArrayOfNumberOnly.md */, - 2AE97CCDC8C4D014282DFBAE17CD786F /* ArrayTest.md */, - 02322A6B0543DADA4A6CB13A420ADA46 /* Capitalization.md */, - 8E309FED474011CFC561423B6D04ED9D /* Cat.md */, - DDC303FBE481D915EC0B8ADDAE1623CB /* CatAllOf.md */, - 5EBFB4694957EBED5253C544C3917DBC /* Category.md */, - 5A4C226AA31A4DF5F6CE9579AE514B34 /* ClassModel.md */, - C3633BEF1B1742609980D8C0500E4519 /* Client.md */, - 799B734D0D692695C613949A6115718D /* Dog.md */, - A2062FC5CF8950D95726336DA1F1F52C /* DogAllOf.md */, - EDB38B126A5C5BA3195B41CDA7E3F6A3 /* EnumArrays.md */, - 4A4CFDCD285AB04B85A4EF0446C859E4 /* EnumClass.md */, - 608A407DE2A47612643C9271D707558C /* EnumTest.md */, - 1AA4FF009847666EB74179EA6C75DE4D /* FakeAPI.md */, - 5164EAF5A81C9C991085A3D5BA3A7627 /* FakeClassnameTags123API.md */, - E57A9C76D05E7DF25E045C8C83CF7B8C /* File.md */, - B52D5D8ED9723274361CA73BDC3875A0 /* FileSchemaTestClass.md */, - 19B33AA036CD6E46A97113343C8904A0 /* FormatTest.md */, - 857C9FC7F70D66015A686E5E392AB04F /* HasOnlyReadOnly.md */, - 90A6677EB26AA075208F098879E425DD /* List.md */, - 0D180F35B94BC88CF6D264D1CDF42624 /* MapTest.md */, - 2895E1635E3A30E234670ED9283C23EA /* MixedPropertiesAndAdditionalPropertiesClass.md */, - DCD118360416984364D92CA81D410FC2 /* Model200Response.md */, - 56430A53624DF50D17D8AB350D129613 /* Name.md */, - 2740D21DE2F99C963ACDC4261609EE50 /* NumberOnly.md */, - AF5C3CBAA31C59F82C8DE03C448B79D8 /* Order.md */, - 7D6449B4CFED6A13D7216B47179E7E4A /* OuterComposite.md */, - 758C5C2D6382B0F77807EFFC06E82BC4 /* OuterEnum.md */, - B5A26ADF8B68902A509D1A52E825E595 /* Pet.md */, - A0F3842CFF62B5C53CBFA83436673969 /* PetAPI.md */, - 14AAB621715B4F0218EABE72CE972494 /* PetstoreClient.podspec */, - B048D2348C3086D80D00537EC372C755 /* README.md */, - 81629AD2DFFED981E047483057BE1362 /* ReadOnlyFirst.md */, - F8D5778A0684580BB744D394024BB4A6 /* Return.md */, - FC82F67A5B34D020108D89B64C3BD691 /* SpecialModelName.md */, - D98CA687BDA7E1DE6C6D098CFD6AE1C7 /* StoreAPI.md */, - F53E66F85590280D11F64545A178CC13 /* StringBooleanMap.md */, - 3D608B4966D9E19DF62468677C823AC5 /* Tag.md */, - 8CF5B2C124751B1983FA287330A81E51 /* TypeHolderDefault.md */, - 0B2EDA68E233F400804C89253BBFB2E5 /* TypeHolderExample.md */, - F1577EF84ADE20D7F04CD82D5BAA684B /* User.md */, - 47214E2FA3F755CB7B808800197ECE59 /* UserAPI.md */, - ); - name = Pod; - sourceTree = ""; - }; - EA9AC0BC3CFB1D7F35089B6086FA77D8 /* iOS */ = { - isa = PBXGroup; - children = ( - DEF099C2A3C48A1F639FAE8CCB3D0CD3 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B6F6E4CC26451E91B59FAE0F6841DC1F /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 26BF2B8B411556E53F9A1BF5BFBAB884 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - F3B7AF12D1FD688C8942217F918E2917 /* RxSwift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 92694CC9CEC645ADF5EE0527F066151E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 83637EFE9CFF36EC1E7A73CCE55884B9 /* PetstoreClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0AB631DF2E9BC76B8736C9EFF6191C0B /* Pods-SwaggerClientTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D540D2F0FD93DE96146EC1B1DCF9577A /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 88B8F96E58CD89EC10B74A1F8365F6FD /* Pods-SwaggerClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1BAC3F8145EDD03FE8EDB0EACEAE3522 /* Pods-SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9F0E63448933894561DF123D81422A1C /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */; - buildPhases = ( - D540D2F0FD93DE96146EC1B1DCF9577A /* Headers */, - D061CB8EF4036877AF78BF62F72CC9FE /* Sources */, - 9C5D10FD5C4D12FBA9AF8DE73A0476D4 /* Frameworks */, - 63F1A864D8FE7083A584B7AB1807C954 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5FF9BADF7EA9C29AF5D5BC7FE75A1966 /* PBXTargetDependency */, - 8F62547FFEE7B2E6D4745289BBC9CD98 /* PBXTargetDependency */, - B61EF3C7B9BF27A4D773281BD10FF5E4 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClient"; - productName = "Pods-SwaggerClient"; - productReference = 0F39AA54BB1773329C8151B721ED0D09 /* Pods_SwaggerClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - 23D70D9651451F43E7E8CC1A87B4B7E9 /* Headers */, - A1C8B029F600160149A2404C342F6E50 /* Sources */, - F1626ADC3A7EC435D2722B3173355D36 /* Frameworks */, - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = 6EDF3214C286AFD4841B3551A037B0A9 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - 49CDD5ADAF3DA23F4C622CC2F9A75659 /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3679C7724191A63BC55F80144E8C3E8E /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - 92694CC9CEC645ADF5EE0527F066151E /* Headers */, - 8FB1A5B10FCFF638132C8B476224E639 /* Sources */, - BFF25BADA4BDAAF2C33C2AB4B7CC18DF /* Frameworks */, - BF5CB098891092F4E60775D327FED8B3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 5D88AFB25CB03E9E800597DEEA2B2C26 /* PBXTargetDependency */, - C909BEA4C8ECA46A453E4E4B0D1CE3F7 /* PBXTargetDependency */, - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = D69932FBD99A6AC9733077CD793DE95E /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */; - buildPhases = ( - A75A99D2E090C9BAAFA7D32A6536D24E /* Headers */, - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */, - D4EC17B7E6732812B49C04E19E9C0EF3 /* Frameworks */, - C2801E627F662CD786BE9F42773CBECF /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClientTests"; - productName = "Pods-SwaggerClientTests"; - productReference = 6F9F8165FD8B1C4B07F06F5DCDDDE89A /* Pods_SwaggerClientTests.framework */; - productType = "com.apple.product-type.framework"; - }; - BA1FAA79F9B74485F4D7279FD41A7D1D /* RxSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1CD3A89A87C87A3CE977265194B2F077 /* Build configuration list for PBXNativeTarget "RxSwift" */; - buildPhases = ( - 26BF2B8B411556E53F9A1BF5BFBAB884 /* Headers */, - F004E8F6BFA59A596E38AAEEA755BE2A /* Sources */, - E44363F6A0C4B876C2CE0C89617F4A74 /* Frameworks */, - DB5BDC9BAA86FDCA59A1DBF43CC5BE57 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RxSwift; - productName = RxSwift; - productReference = BE1E7C2852E09D117ECDA841F0A5CE03 /* RxSwift.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 752761252CF779269D588A7735D3E8BD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 3383968E74B5371B20BB519B170DC7FD /* Alamofire */, - 49CDD5ADAF3DA23F4C622CC2F9A75659 /* PetstoreClient */, - 1BAC3F8145EDD03FE8EDB0EACEAE3522 /* Pods-SwaggerClient */, - 7ECA32D1B18128C394D8D35F346BEEC7 /* Pods-SwaggerClientTests */, - BA1FAA79F9B74485F4D7279FD41A7D1D /* RxSwift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 28FF73341543B6F0A7DF3C20CFFEA0AA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63F1A864D8FE7083A584B7AB1807C954 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BF5CB098891092F4E60775D327FED8B3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C2801E627F662CD786BE9F42773CBECF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DB5BDC9BAA86FDCA59A1DBF43CC5BE57 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8FB1A5B10FCFF638132C8B476224E639 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AB6D07352A2E898824B49759CCA162EC /* AdditionalPropertiesAnyType.swift in Sources */, - 30769345FEC859A4DA77F0CBBBFF3890 /* AdditionalPropertiesArray.swift in Sources */, - EE2E9AE7C6CDF0C9D9E77E6EB2800E40 /* AdditionalPropertiesBoolean.swift in Sources */, - 81690915FE86ECD7CDE95633E3762009 /* AdditionalPropertiesClass.swift in Sources */, - F77A046367A53931C9B4424F17D83BB0 /* AdditionalPropertiesInteger.swift in Sources */, - 1624BFF13E6CFADD39065BAFE15CFE5E /* AdditionalPropertiesNumber.swift in Sources */, - 92BEB5554FA6A51ED6995B19BEC8D7ED /* AdditionalPropertiesObject.swift in Sources */, - 76079C032826A835D0B13E6D617606C1 /* AdditionalPropertiesString.swift in Sources */, - 97BF7A9642F28D14C03458F24C030DB2 /* AlamofireImplementations.swift in Sources */, - C8371B319EBEF3DFDBA5C573AB46EB4C /* Animal.swift in Sources */, - 69E9DE3AD0F2CA6895BEAFA6691914BB /* AnimalFarm.swift in Sources */, - C3F9BB06A12A0F61CDC2511CDDE62B09 /* AnotherFakeAPI.swift in Sources */, - E8BF5D98F29555477C6236F1890DF767 /* APIHelper.swift in Sources */, - DFAA7C26B25E676D63DD5FD0D74ABB30 /* ApiResponse.swift in Sources */, - B39356F857F84E608624AB4BA381F5B9 /* APIs.swift in Sources */, - D399C483EEF039C293A7B84B82BE2B49 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 59A7BE86B0880261634D8F6F18EEB240 /* ArrayOfNumberOnly.swift in Sources */, - 877B7447EF54C9ED4966D3D1AA9B8D07 /* ArrayTest.swift in Sources */, - F2179ACF4366D4B4E62CD5C99FA1A679 /* Capitalization.swift in Sources */, - 0DC13877F21F72004D7711BF3D7EFA3C /* Cat.swift in Sources */, - 0E761CEA33A04DDA594CC7359F820A0B /* CatAllOf.swift in Sources */, - 5E4C98BF473FF5D493E130A785EB73BA /* Category.swift in Sources */, - 14A822B7A6821B022899A68D5003C85D /* ClassModel.swift in Sources */, - 5B8FDB00381ED25B1D5F06A29649ADEE /* Client.swift in Sources */, - DCAC99A86576E188AC0079FE5607C541 /* CodableHelper.swift in Sources */, - 00B92B3A8271BE0D78B2C346A45054EB /* Configuration.swift in Sources */, - AEB4C18DF052DCB1A0FF1EA600194A2E /* Dog.swift in Sources */, - 018C6F5369B9ECCE29BA2F43D6C12385 /* DogAllOf.swift in Sources */, - 860138DC0F719DA0953C144268F4FDD7 /* EnumArrays.swift in Sources */, - E2A989FE2A8C7E19B78150061B1F404E /* EnumClass.swift in Sources */, - 6A3FA5DFDE7C0D52EA3B3E4A62F2969F /* EnumTest.swift in Sources */, - DED9A421CFF78F29A27F00A43A5478D1 /* Extensions.swift in Sources */, - 6C7F38FABFBDF77E5B4D6AB137E0A5F4 /* FakeAPI.swift in Sources */, - 23F822E146B3F3C63EF430F9ED1EA5B5 /* FakeClassnameTags123API.swift in Sources */, - 597234E9E02E21C0F83911110DCA6E74 /* File.swift in Sources */, - 9E28E0EB779608B1E70DD6319247E826 /* FileSchemaTestClass.swift in Sources */, - 7105E17FDE296BA6B37E8B5E2AAD9058 /* FormatTest.swift in Sources */, - 82D86B9AEF31C560C2A0DB4FC9B979A1 /* HasOnlyReadOnly.swift in Sources */, - 5905B99E94D9ECE5157217BEC60C4FD9 /* JSONEncodableEncoding.swift in Sources */, - 438765B0F3642DE51D314A21726679AF /* JSONEncodingHelper.swift in Sources */, - 6CB554A9CE0D611C158CC5B9DB6873D7 /* List.swift in Sources */, - C0A9C53855321304AFBE800FC3BB8864 /* MapTest.swift in Sources */, - A06C5095E2319DD4B8B8047539769999 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 1928C38569D41E9A17B2A7053C2737C5 /* Model200Response.swift in Sources */, - BA2E85147C4CE9D6AA9EC39DBE99A6C0 /* Models.swift in Sources */, - DB94F9F67A94D6A5CBAA286F44ED10ED /* Name.swift in Sources */, - 611DDEABDBA112B4ED8A489288C5E3AA /* NumberOnly.swift in Sources */, - 367D7C38C9D75A77C7803E9ACE55F939 /* Order.swift in Sources */, - B8407A12CCFF56CC0C1C34C1B8A9F8D9 /* OuterComposite.swift in Sources */, - 7B5B94CF82B28AED61861EC39D661BEC /* OuterEnum.swift in Sources */, - 7BAA9953F0607C50A41C04848C10E156 /* Pet.swift in Sources */, - 01BBC91167CEED10419EC29FB25A84B4 /* PetAPI.swift in Sources */, - DB2950EE1B19C535EBD1E572494F55E5 /* PetstoreClient-dummy.m in Sources */, - 5B9F60D1EEAA27243456F6F5DE0FA31A /* ReadOnlyFirst.swift in Sources */, - 944A8ACBB625207067C5A154726E140A /* Return.swift in Sources */, - 418B6C450B8DFDF393B4EF9D8F2CE920 /* SpecialModelName.swift in Sources */, - 64E469791F8F79F87724641C4B16AF22 /* StoreAPI.swift in Sources */, - 4B3E6EC0A866782A28E4504AC67B4A1A /* StringBooleanMap.swift in Sources */, - 4FFF28AF1937884226953CC18EFFACCA /* Tag.swift in Sources */, - 5E08679A799BC6809B8DE2089F06E621 /* TypeHolderDefault.swift in Sources */, - 4EF745BE3763312A553314237EBB7B3A /* TypeHolderExample.swift in Sources */, - E4F50B1433000199FD611EEBCF3B6BB0 /* User.swift in Sources */, - 55952681015C9453540298BF9C091033 /* UserAPI.swift in Sources */, - 2A1C0B23E2CEEE38D4C0133ED988004F /* XmlItem.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A1C8B029F600160149A2404C342F6E50 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7E3538A6992A38276764936A9733493D /* AFError.swift in Sources */, - 772911DA6E33D1CBBC30131B7C8BDBB3 /* Alamofire-dummy.m in Sources */, - 0A39AF55285A3A4F7CBABB6D822FA4A3 /* Alamofire.swift in Sources */, - 3E0749AF6C51BCF0E4A41CF1D6A76FED /* DispatchQueue+Alamofire.swift in Sources */, - AEA829AB1A8AF2AD077A808AED6B178A /* MultipartFormData.swift in Sources */, - 73AB05789A4982944AF68DBD013E3EB7 /* NetworkReachabilityManager.swift in Sources */, - 1D29D2ACADF961F69D32B06FA6A09E28 /* Notifications.swift in Sources */, - 700D3D95AF9520CB227846DFD943A2DA /* ParameterEncoding.swift in Sources */, - 355C18EEC82624A06A6CC93965258E33 /* Request.swift in Sources */, - 059D92B7BBFBEC53E9A3B6E11C5C3B3A /* Response.swift in Sources */, - 6EFD003458AE7F689DEA720A2030C261 /* ResponseSerialization.swift in Sources */, - EB0DD8CEA1A69867A30267439C970440 /* Result.swift in Sources */, - 8D2A6A90A6DDAF75EA52D471258545CC /* ServerTrustPolicy.swift in Sources */, - A1EC41966B261DCE460BCDE5124A1DBE /* SessionDelegate.swift in Sources */, - D3FA0AA634AAEA99AB3FABC36BB4958C /* SessionManager.swift in Sources */, - 77E8F0EB9FFBE2E3EB0C77095C644606 /* TaskDelegate.swift in Sources */, - 60B6C2A003864AAD3A426448152F67BE /* Timeline.swift in Sources */, - AA56769D8733D3F3E7976742D5ABA998 /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D061CB8EF4036877AF78BF62F72CC9FE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E4962E9CD3D8EA651C84498D271EC753 /* Pods-SwaggerClient-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F004E8F6BFA59A596E38AAEEA755BE2A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DA0C6077B07424B6848BD63049B6777 /* AddRef.swift in Sources */, - AAA1712D2763B6D2CF0011403EBE512D /* Amb.swift in Sources */, - 06F02D2382D5018D765DB0F34C9C276D /* AnonymousDisposable.swift in Sources */, - CB69E0C638A7C58B5FC9073B793273AD /* AnonymousObserver.swift in Sources */, - 0CC204661593617D4DF5240BD993DF4A /* AnyObserver.swift in Sources */, - 8FAB1056E36610DF9EE92221941D800D /* AsMaybe.swift in Sources */, - C54FB31D5C9750E9722B2EBB3C05754F /* AsSingle.swift in Sources */, - 068FC2A8666D98716567362F2E0D6845 /* AsyncLock.swift in Sources */, - 96ED1FEACF444FF70C6550E95A572890 /* AsyncSubject.swift in Sources */, - B385CD158B4DB49B50E46C688B9F0AED /* AtomicInt.swift in Sources */, - 94C2BDABC69296B090CFC89FD5483D41 /* Bag+Rx.swift in Sources */, - B01F02AFF4BD60048220EE91C369DA72 /* Bag.swift in Sources */, - 95A5DD145CB674719312A9CCE333C40A /* BehaviorSubject.swift in Sources */, - E6CAA0D168E81EF9679A5388F4BC95D8 /* BinaryDisposable.swift in Sources */, - E4F4D8D1953813B37BD79C66BE55B132 /* BooleanDisposable.swift in Sources */, - B7A2C80AE512BA32546E4BB9213F70CC /* Buffer.swift in Sources */, - A9A00DE2FF9E8E7E0C750F495837D99E /* Cancelable.swift in Sources */, - 425395ADB55B02A98D0538731936BD79 /* Catch.swift in Sources */, - 3E3FA01E3DC9CFFD4C738E922CDFA23C /* CombineLatest+arity.swift in Sources */, - BB7E003CB2D82BDBBBE3A9E1AA1C1682 /* CombineLatest+Collection.swift in Sources */, - 0C8B09DF05E2E41B7DF054A3514DB945 /* CombineLatest.swift in Sources */, - 6DCDEA9935C7542C76178B25A7D873FF /* Completable+AndThen.swift in Sources */, - C88589E390360E93817DA97CBF5DCBA4 /* Completable.swift in Sources */, - 04C06CF0B6C5C73B4CD192D070F21671 /* CompositeDisposable.swift in Sources */, - D128DB98CB0B97380BDEC326306D0FFC /* Concat.swift in Sources */, - 4481D7A928F997D2717CA342C9CAF3AC /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 42403A783F23CEE64D8AF4D9BDB87802 /* ConcurrentMainScheduler.swift in Sources */, - 8DDD2130C49010F4CCBA6EF665E1288F /* ConnectableObservableType.swift in Sources */, - F33B53F266660974D851A82B03B2907E /* Create.swift in Sources */, - FCFED59A764898B95991A177DDEB362E /* CurrentThreadScheduler.swift in Sources */, - 6B9765DD631FED6DDDE0393B076895CC /* Debounce.swift in Sources */, - EE1917B8030B1B81478973483D704AAE /* Debug.swift in Sources */, - 60F135C1B2E2A3DBF5D91AAFEC889628 /* DefaultIfEmpty.swift in Sources */, - 97AEDE420913FDB38F1F907BBAAF2E8B /* Deferred.swift in Sources */, - C2C0AE3588986E52B3965206EC540324 /* Delay.swift in Sources */, - 93D8F9361CA384D802B729C027A29D93 /* DelaySubscription.swift in Sources */, - 5FB1BC9A57D01324146B7AE5F03C6370 /* Dematerialize.swift in Sources */, - EE5BB9D47B59D64E282A3FCB17CD6132 /* Deprecated.swift in Sources */, - 6D1DF0296E23FD6AD4E4676FD690C3BA /* DeprecationWarner.swift in Sources */, - 2E2C54FE54D4ED7D30B9CFD7F5CE26ED /* DispatchQueue+Extensions.swift in Sources */, - 584C49BA4DCCCFD50B2FAF41783029C3 /* DispatchQueueConfiguration.swift in Sources */, - 10F4BDB750BA6362739BBCFD77AFFC55 /* Disposable.swift in Sources */, - 5615DD06EEEA89A9237BB15D2E516B79 /* Disposables.swift in Sources */, - 231FF5CEABDC19D5620EF1D250075969 /* DisposeBag.swift in Sources */, - 7D3D0B52CF0C6CD831B149E64FE4AB3E /* DisposeBase.swift in Sources */, - 6E428993840E5F638CFD77582468C982 /* DistinctUntilChanged.swift in Sources */, - 411F93A1F501D9CE8A7BB17463F88BF2 /* Do.swift in Sources */, - B2F61D4C66E7E9BF795A768F9A52F889 /* ElementAt.swift in Sources */, - 6B1C6B7CA8A53D9502AE9EB84CA3181F /* Empty.swift in Sources */, - AA6D3CED1566D71B0E39A1CDE3B32864 /* Enumerated.swift in Sources */, - 16E27971B029CD86CC9ABFBDAF0B50C3 /* Error.swift in Sources */, - 9D443C8AF196B744F2340AD3DCE6CE0A /* Errors.swift in Sources */, - 00CD0D028A7C7FAD19004F30BF905FFA /* Event.swift in Sources */, - 45EF4D7DAC7881BD321F59D769C3ED56 /* Filter.swift in Sources */, - 04BCDBAEB221E44EBC35B35966D5329C /* First.swift in Sources */, - 247F1D441C3FFE1A86775F95FD5C526D /* Generate.swift in Sources */, - 0CF84DB9C3AF68812DF22E3A7B1A5345 /* GroupBy.swift in Sources */, - A1A4F6F86BDF18C228F08311EBD03E84 /* GroupedObservable.swift in Sources */, - 20C9165173E84E273472110B783CEF0F /* HistoricalScheduler.swift in Sources */, - 32C3F28679808D14D41E5CE764B18D68 /* HistoricalSchedulerTimeConverter.swift in Sources */, - 7DC19974867E0956AD13FA28D9038536 /* ImmediateSchedulerType.swift in Sources */, - 536174909D73A714232615AB05687E15 /* InfiniteSequence.swift in Sources */, - 5BC3B4927F5E340F661D56FCF2B51D75 /* InvocableScheduledItem.swift in Sources */, - A26702A2CFB5B831F7FB80FFA29BEEEC /* InvocableType.swift in Sources */, - E16F11503BA04EC3B205DBF20BD33DE1 /* Just.swift in Sources */, - 38B3FCCBE586F4016F203082690CEE6E /* Lock.swift in Sources */, - 9587E802C281FA381DF9E97EC426814D /* LockOwnerType.swift in Sources */, - 4CC43360234D5FCB4E5CAA95BAEF47C9 /* MainScheduler.swift in Sources */, - 79523FA5D24E7AC22385AE14E18FA1CB /* Map.swift in Sources */, - 8487CC1DE956BDEEAC9CDF413E1A58E4 /* Materialize.swift in Sources */, - C939859F6DB0464712141486E944F42C /* Maybe.swift in Sources */, - CAB19EE096FBEAAE1FDB28F56B8B4F78 /* Merge.swift in Sources */, - 0A426503BF8551A7F24118E4D3133404 /* Multicast.swift in Sources */, - DC551676E7C8D267368063D532D092B2 /* Never.swift in Sources */, - 2832890547C0F2BC47A5ACB24FE1E556 /* NopDisposable.swift in Sources */, - 2F73B36CB2A0C051C5FF6865EC7505A8 /* Observable.swift in Sources */, - B9EF5A80D032538680EFE75929C28D6D /* ObservableConvertibleType.swift in Sources */, - 28783CBF85DD482E1793B019CD5E056A /* ObservableType+Extensions.swift in Sources */, - 40DC18CC960EEC0EE71E945A73F6D7BC /* ObservableType+PrimitiveSequence.swift in Sources */, - 51FF11FC8E286A54377E64297EEA7696 /* ObservableType.swift in Sources */, - 1BE47AC4C39BCC2AD678B0D94066C3E7 /* ObserveOn.swift in Sources */, - 1FAE4751B8A1A4906CA23B6D14705DD1 /* ObserverBase.swift in Sources */, - 7C7B2182C3E7D832DF075B3016ED1B05 /* ObserverType.swift in Sources */, - E38FB4D007348119E958AED58DDD44B4 /* OperationQueueScheduler.swift in Sources */, - 37BF531FD8F4EF30E68E9A205BDAB096 /* Optional.swift in Sources */, - 0A084BBB077AB3863D1500B7E79B3FD4 /* Platform.Darwin.swift in Sources */, - BF15B41D6CCCFAF4DCA617D0431D4781 /* Platform.Linux.swift in Sources */, - 96F8C88984B492B5D186D6DC6FEF8D0C /* PrimitiveSequence+Zip+arity.swift in Sources */, - 0E35C38093091926F74510A897639D32 /* PrimitiveSequence.swift in Sources */, - 024712F363DB19CB17FD9F36B489D43F /* PriorityQueue.swift in Sources */, - 72F440B2AB88E31879EE58D8B7D5A05E /* Producer.swift in Sources */, - 8BB1ACFFA7880AE54B7300AF440F549D /* PublishSubject.swift in Sources */, - 15CC488D9E6EF29B02174A4B036444F1 /* Queue.swift in Sources */, - 01955339496D9F45BD537BEB03B04280 /* Range.swift in Sources */, - E403F1184BAC06680AF116EE8EDB7BEF /* Reactive.swift in Sources */, - 9F9CF99BD0C63948B4413396FD8DBA54 /* RecursiveLock.swift in Sources */, - 0C0D4B80E4F230F6A106A0E94C6A733E /* RecursiveScheduler.swift in Sources */, - C99C068899D064944E605570D38E85F2 /* Reduce.swift in Sources */, - 2F16BB60B2A862F9988A1C1D1DB25326 /* RefCountDisposable.swift in Sources */, - D0E317E6FC43BC7D4F07C17B584D8EFD /* Repeat.swift in Sources */, - 5B4412836335EB28C03D517FD6F7EB65 /* ReplaySubject.swift in Sources */, - 8A3542104FBA7C2FA7BF8E95AAAE0BE7 /* RetryWhen.swift in Sources */, - 7893293BC4613AE2625D1684ED6888AD /* Rx.swift in Sources */, - 9CD65D0519639A42284304F6A662E10A /* RxMutableBox.swift in Sources */, - 0E19118925E2ABE3DFE3392B76937491 /* RxSwift-dummy.m in Sources */, - 5720D4DCF4AA3DDB9D45802B854852A1 /* Sample.swift in Sources */, - EF7CEEFEE64CCFE8E050F33E8E6716EB /* Scan.swift in Sources */, - F7D0A45619BD381EC7FDEF8F41057C4A /* ScheduledDisposable.swift in Sources */, - B7CC8FC752B3A986B9DFC4A0F09BB316 /* ScheduledItem.swift in Sources */, - 21EA0909C5162AC1A2F0BEB44161C091 /* ScheduledItemType.swift in Sources */, - 2DE581AFC0E6541F53D79C9CF5BA0252 /* SchedulerServices+Emulation.swift in Sources */, - 5318E7579B1107A6E6B8A80EAC437FA2 /* SchedulerType.swift in Sources */, - 6F3CA008415A35BA7E271CFBB8311E6F /* Sequence.swift in Sources */, - 2C75624448C07245398F78A8E8F76C6C /* SerialDispatchQueueScheduler.swift in Sources */, - 786342EA1908DF041945B208001AB341 /* SerialDisposable.swift in Sources */, - D9D43BA204D86056FDBFCC92F87C7EAB /* ShareReplayScope.swift in Sources */, - B822D1C05E59F8303723EA7F59C78F40 /* Single.swift in Sources */, - 1316C19AE6BD02B2D67A610EB8124F48 /* SingleAssignmentDisposable.swift in Sources */, - 3548E9B5F3D2CB1D6CF60A2E5E5B2A32 /* SingleAsync.swift in Sources */, - D706A86E37DD6D833CA7A079A3E15B7E /* Sink.swift in Sources */, - 654F552A8DD4BF67850CAFEDF249D815 /* Skip.swift in Sources */, - B38FF962610DEFB271EA1FCA95E3B37A /* SkipUntil.swift in Sources */, - 9C894D0C88D763CD86C16DDCE698F9B3 /* SkipWhile.swift in Sources */, - 5A74E080F11D3B73C6E6A2E406E7E648 /* StartWith.swift in Sources */, - C1942DA08443E26FE1CD7BF2A972B27C /* String+Rx.swift in Sources */, - 04E7491A1A273461D639A352FDF90064 /* SubjectType.swift in Sources */, - A5E492F7194809622E130CC6569F46E2 /* SubscribeOn.swift in Sources */, - E7AC1A5D6FA609B69AFDE50FC01127F2 /* SubscriptionDisposable.swift in Sources */, - BA8C86B1D885FFA4850EC5F3528669E9 /* SwiftSupport.swift in Sources */, - 93000BED51CFB0CDB262C897C8C104A7 /* Switch.swift in Sources */, - 9C66CB81052F764079D0FA68B6E36BEF /* SwitchIfEmpty.swift in Sources */, - 26BE990BD12DA8BA3E8C11D9BE7A095D /* SynchronizedDisposeType.swift in Sources */, - 1B854BF767678148C17B436F65FEED5C /* SynchronizedOnType.swift in Sources */, - 7E79F3A456266FFDA768E0CF14DBC2F1 /* SynchronizedUnsubscribeType.swift in Sources */, - 28BC7B80549B8F4B21578D07D2D853AC /* TailRecursiveSink.swift in Sources */, - 957BB9043F5F5609C348C47C523D6C79 /* Take.swift in Sources */, - 3E4C76A301104B55E4A601D4E59AF14E /* TakeLast.swift in Sources */, - 32FC3AD0AB13B89CE579D458841BB17B /* TakeUntil.swift in Sources */, - B312CFC44488357265F713C8EF63291C /* TakeWhile.swift in Sources */, - 8ED35E25E311CF3F12564041A7F8BB2B /* Throttle.swift in Sources */, - 755536BB16D53CBC961B0A8E3FDF7739 /* Timeout.swift in Sources */, - 3EAF0605A2B6B9A90A06560FAED89BF9 /* Timer.swift in Sources */, - 8CA88B336020592CDC5F3548A4DFE697 /* ToArray.swift in Sources */, - 17DBE97DF7E4655A51189118813169BA /* Using.swift in Sources */, - D0847A960A008DA8608CBCF219A8A2A7 /* VirtualTimeConverterType.swift in Sources */, - CAFFB7A58F51661BC7DD5284276EC1ED /* VirtualTimeScheduler.swift in Sources */, - 18F3B3ECDFE24B0D2BB6DFB066A7DD4A /* Window.swift in Sources */, - 2C5F3731461E52488C08666B9D752D8E /* WithLatestFrom.swift in Sources */, - 4D491A944EF08F4B8656305C65C71C76 /* Zip+arity.swift in Sources */, - 4CE0D20F55D373232019950D791B50AC /* Zip+Collection.swift in Sources */, - 63B9CDC423637A15BD3F8F4B9651B62D /* Zip.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F7D9DB86AE0913CC2B294C55BFD934AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8012A57CFFC574F745FBA46D335BBA6F /* Pods-SwaggerClientTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5D88AFB25CB03E9E800597DEEA2B2C26 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = AEA2781CDC8DB413C920DD9F7F78F124 /* PBXContainerItemProxy */; - }; - 5FF9BADF7EA9C29AF5D5BC7FE75A1966 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 3383968E74B5371B20BB519B170DC7FD /* Alamofire */; - targetProxy = 2A8AF3B6391C5FF251470E3091B2B1D2 /* PBXContainerItemProxy */; - }; - 8F62547FFEE7B2E6D4745289BBC9CD98 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PetstoreClient; - target = 49CDD5ADAF3DA23F4C622CC2F9A75659 /* PetstoreClient */; - targetProxy = B36C681A6EB35CB2430BAB3BAF9AB886 /* PBXContainerItemProxy */; - }; - B61EF3C7B9BF27A4D773281BD10FF5E4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = BA1FAA79F9B74485F4D7279FD41A7D1D /* RxSwift */; - targetProxy = ED09ABD99E0D387BFD78CCCE937FA689 /* PBXContainerItemProxy */; - }; - C18A6DC0C9B8408542F3D944BB6D67F4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Pods-SwaggerClient"; - target = 1BAC3F8145EDD03FE8EDB0EACEAE3522 /* Pods-SwaggerClient */; - targetProxy = FA1A8E2F3FE2899A723889F94EACA0E5 /* PBXContainerItemProxy */; - }; - C909BEA4C8ECA46A453E4E4B0D1CE3F7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = BA1FAA79F9B74485F4D7279FD41A7D1D /* RxSwift */; - targetProxy = 116DEBAFC9022016EADCAFC9F9BC1542 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 175DE0F32DFB9352D8BDE2242D146278 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 28DB89F2024F2DDD08AE89C3006D009E /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2B15A656975AD6239E491D34DB89E598 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BE6232D0F85A4EF002139921CBA82C3F /* RxSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/RxSwift-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 3B00EA6E3BEB8B678C1C0FBE7D10EBB4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BE6232D0F85A4EF002139921CBA82C3F /* RxSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/RxSwift-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 41268AF552E2DC6A5873C87C81174F7D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4FB24B4936663207D1E346C5B6B9EAD4 /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 6FB7A8200113F8B35642AF088882257D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C039CC9F68E1DE11B36488154891AC /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 72215A7E736410410139FC6A3FCEAAEC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CD7450FA98C71F5F12227D9EE29EF6FF /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A345BCBDE6C296957161A3E85A47A280 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4FB24B4936663207D1E346C5B6B9EAD4 /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A65A298AF5D17903189605681170DC09 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B8AE4746D376A853C4ABE57A194FD450 /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - AB4D69770D8ACE3A05E80BB3502666F6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - E0CA0082E44CE578414DCAED684E16A2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 06F700708FB1FE830160940D2740EC68 /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - F232B5ECA11A71BFA199A229B323F454 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - FA4585C83A71BBB23D144F31704C9C56 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 28DB89F2024F2DDD08AE89C3006D009E /* PetstoreClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/PetstoreClient-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - PRODUCT_MODULE_NAME = PetstoreClient; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1CD3A89A87C87A3CE977265194B2F077 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2B15A656975AD6239E491D34DB89E598 /* Debug */, - 3B00EA6E3BEB8B678C1C0FBE7D10EBB4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3679C7724191A63BC55F80144E8C3E8E /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 175DE0F32DFB9352D8BDE2242D146278 /* Debug */, - FA4585C83A71BBB23D144F31704C9C56 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - AB4D69770D8ACE3A05E80BB3502666F6 /* Debug */, - F232B5ECA11A71BFA199A229B323F454 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8F09E039867007D3576FEED9032526A8 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 72215A7E736410410139FC6A3FCEAAEC /* Debug */, - E0CA0082E44CE578414DCAED684E16A2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9F0E63448933894561DF123D81422A1C /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6FB7A8200113F8B35642AF088882257D /* Debug */, - A65A298AF5D17903189605681170DC09 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E87124444A44B7DB55208E7FEC21D331 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 41268AF552E2DC6A5873C87C81174F7D /* Debug */, - A345BCBDE6C296957161A3E85A47A280 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md deleted file mode 100644 index d6765d9c9b9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -**The MIT License** -**Copyright © 2015 Krunoslav Zaher** -**All rights reserved.** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/AtomicInt.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/AtomicInt.swift deleted file mode 100644 index d8d958078fa..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/AtomicInt.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// AtomicInt.swift -// Platform -// -// Created by Krunoslav Zaher on 10/28/18. -// Copyright © 2018 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSLock - -final class AtomicInt: NSLock { - fileprivate var value: Int32 - public init(_ value: Int32 = 0) { - self.value = value - } -} - -@discardableResult -@inline(__always) -func add(_ this: AtomicInt, _ value: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value += value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func sub(_ this: AtomicInt, _ value: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value -= value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func fetchOr(_ this: AtomicInt, _ mask: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value |= mask - this.unlock() - return oldValue -} - -@inline(__always) -func load(_ this: AtomicInt) -> Int32 { - this.lock() - let oldValue = this.value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func increment(_ this: AtomicInt) -> Int32 { - return add(this, 1) -} - -@discardableResult -@inline(__always) -func decrement(_ this: AtomicInt) -> Int32 { - return sub(this, 1) -} - -@inline(__always) -func isFlagSet(_ this: AtomicInt, _ mask: Int32) -> Bool { - return (load(this) & mask) != 0 -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift deleted file mode 100644 index 4ad0a2bc188..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift +++ /dev/null @@ -1,187 +0,0 @@ -// -// Bag.swift -// Platform -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Swift - -let arrayDictionaryMaxSize = 30 - -struct BagKey { - /** - Unique identifier for object added to `Bag`. - - It's underlying type is UInt64. If we assume there in an idealized CPU that works at 4GHz, - it would take ~150 years of continuous running time for it to overflow. - */ - fileprivate let rawValue: UInt64 -} - -/** -Data structure that represents a bag of elements typed `T`. - -Single element can be stored multiple times. - -Time and space complexity of insertion and deletion is O(n). - -It is suitable for storing small number of elements. -*/ -struct Bag : CustomDebugStringConvertible { - /// Type of identifier for inserted elements. - typealias KeyType = BagKey - - typealias Entry = (key: BagKey, value: T) - - fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) - - // data - - // first fill inline variables - var _key0: BagKey? - var _value0: T? - - // then fill "array dictionary" - var _pairs = ContiguousArray() - - // last is sparse dictionary - var _dictionary: [BagKey: T]? - - var _onlyFastPath = true - - /// Creates new empty `Bag`. - init() { - } - - /** - Inserts `value` into bag. - - - parameter element: Element to insert. - - returns: Key that can be used to remove element from bag. - */ - mutating func insert(_ element: T) -> BagKey { - let key = _nextKey - - _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) - - if _key0 == nil { - _key0 = key - _value0 = element - return key - } - - _onlyFastPath = false - - if _dictionary != nil { - _dictionary![key] = element - return key - } - - if _pairs.count < arrayDictionaryMaxSize { - _pairs.append((key: key, value: element)) - return key - } - - _dictionary = [key: element] - - return key - } - - /// - returns: Number of elements in bag. - var count: Int { - let dictionaryCount: Int = _dictionary?.count ?? 0 - return (_value0 != nil ? 1 : 0) + _pairs.count + dictionaryCount - } - - /// Removes all elements from bag and clears capacity. - mutating func removeAll() { - _key0 = nil - _value0 = nil - - _pairs.removeAll(keepingCapacity: false) - _dictionary?.removeAll(keepingCapacity: false) - } - - /** - Removes element with a specific `key` from bag. - - - parameter key: Key that identifies element to remove from bag. - - returns: Element that bag contained, or nil in case element was already removed. - */ - mutating func removeKey(_ key: BagKey) -> T? { - if _key0 == key { - _key0 = nil - let value = _value0! - _value0 = nil - return value - } - - if let existingObject = _dictionary?.removeValue(forKey: key) { - return existingObject - } - - for i in 0 ..< _pairs.count where _pairs[i].key == key { - let value = _pairs[i].value - _pairs.remove(at: i) - return value - } - - return nil - } -} - -extension Bag { - /// A textual representation of `self`, suitable for debugging. - var debugDescription : String { - return "\(self.count) elements in Bag" - } -} - -extension Bag { - /// Enumerates elements inside the bag. - /// - /// - parameter action: Enumeration closure. - func forEach(_ action: (T) -> Void) { - if _onlyFastPath { - if let value0 = _value0 { - action(value0) - } - return - } - - let value0 = _value0 - let dictionary = _dictionary - - if let value0 = value0 { - action(value0) - } - - for i in 0 ..< _pairs.count { - action(_pairs[i].value) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - action(element) - } - } - } -} - -extension BagKey: Hashable { - #if swift(>=4.2) - func hash(into hasher: inout Hasher) { - hasher.combine(rawValue) - } - #else - var hashValue: Int { - return rawValue.hashValue - } - #endif -} - -func ==(lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.rawValue == rhs.rawValue -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift deleted file mode 100644 index 5a573a0de16..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// InfiniteSequence.swift -// Platform -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Sequence that repeats `repeatedValue` infinite number of times. -struct InfiniteSequence : Sequence { - typealias Element = E - typealias Iterator = AnyIterator - - private let _repeatedValue: E - - init(repeatedValue: E) { - _repeatedValue = repeatedValue - } - - func makeIterator() -> Iterator { - let repeatedValue = _repeatedValue - return AnyIterator { - return repeatedValue - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift deleted file mode 100644 index f7cb99c8b02..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift +++ /dev/null @@ -1,111 +0,0 @@ -// -// PriorityQueue.swift -// Platform -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct PriorityQueue { - private let _hasHigherPriority: (Element, Element) -> Bool - private let _isEqual: (Element, Element) -> Bool - - fileprivate var _elements = [Element]() - - init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { - _hasHigherPriority = hasHigherPriority - _isEqual = isEqual - } - - mutating func enqueue(_ element: Element) { - _elements.append(element) - bubbleToHigherPriority(_elements.count - 1) - } - - func peek() -> Element? { - return _elements.first - } - - var isEmpty: Bool { - return _elements.count == 0 - } - - mutating func dequeue() -> Element? { - guard let front = peek() else { - return nil - } - - removeAt(0) - - return front - } - - mutating func remove(_ element: Element) { - for i in 0 ..< _elements.count { - if _isEqual(_elements[i], element) { - removeAt(i) - return - } - } - } - - private mutating func removeAt(_ index: Int) { - let removingLast = index == _elements.count - 1 - if !removingLast { - _elements.swapAt(index, _elements.count - 1) - } - - _ = _elements.popLast() - - if !removingLast { - bubbleToHigherPriority(index) - bubbleToLowerPriority(index) - } - } - - private mutating func bubbleToHigherPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - - while unbalancedIndex > 0 { - let parentIndex = (unbalancedIndex - 1) / 2 - guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } - _elements.swapAt(unbalancedIndex, parentIndex) - unbalancedIndex = parentIndex - } - } - - private mutating func bubbleToLowerPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - while true { - let leftChildIndex = unbalancedIndex * 2 + 1 - let rightChildIndex = unbalancedIndex * 2 + 2 - - var highestPriorityIndex = unbalancedIndex - - if leftChildIndex < _elements.count && _hasHigherPriority(_elements[leftChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = leftChildIndex - } - - if rightChildIndex < _elements.count && _hasHigherPriority(_elements[rightChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = rightChildIndex - } - - guard highestPriorityIndex != unbalancedIndex else { break } - _elements.swapAt(highestPriorityIndex, unbalancedIndex) - - unbalancedIndex = highestPriorityIndex - } - } -} - -extension PriorityQueue : CustomDebugStringConvertible { - var debugDescription: String { - return _elements.debugDescription - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift deleted file mode 100644 index d05726c7b99..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Queue.swift -// Platform -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Data structure that represents queue. - -Complexity of `enqueue`, `dequeue` is O(1) when number of operations is -averaged over N operations. - -Complexity of `peek` is O(1). -*/ -struct Queue: Sequence { - /// Type of generator. - typealias Generator = AnyIterator - - private let _resizeFactor = 2 - - private var _storage: ContiguousArray - private var _count = 0 - private var _pushNextIndex = 0 - private let _initialCapacity: Int - - /** - Creates new queue. - - - parameter capacity: Capacity of newly created queue. - */ - init(capacity: Int) { - _initialCapacity = capacity - - _storage = ContiguousArray(repeating: nil, count: capacity) - } - - private var dequeueIndex: Int { - let index = _pushNextIndex - count - return index < 0 ? index + _storage.count : index - } - - /// - returns: Is queue empty. - var isEmpty: Bool { - return count == 0 - } - - /// - returns: Number of elements inside queue. - var count: Int { - return _count - } - - /// - returns: Element in front of a list of elements to `dequeue`. - func peek() -> T { - precondition(count > 0) - - return _storage[dequeueIndex]! - } - - mutating private func resizeTo(_ size: Int) { - var newStorage = ContiguousArray(repeating: nil, count: size) - - let count = _count - - let dequeueIndex = self.dequeueIndex - let spaceToEndOfQueue = _storage.count - dequeueIndex - - // first batch is from dequeue index to end of array - let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) - // second batch is wrapped from start of array to end of queue - let numberOfElementsInSecondBatch = count - countElementsInFirstBatch - - newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] - newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] - - _count = count - _pushNextIndex = count - _storage = newStorage - } - - /// Enqueues `element`. - /// - /// - parameter element: Element to enqueue. - mutating func enqueue(_ element: T) { - if count == _storage.count { - resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) - } - - _storage[_pushNextIndex] = element - _pushNextIndex += 1 - _count += 1 - - if _pushNextIndex >= _storage.count { - _pushNextIndex -= _storage.count - } - } - - private mutating func dequeueElementOnly() -> T { - precondition(count > 0) - - let index = dequeueIndex - - defer { - _storage[index] = nil - _count -= 1 - } - - return _storage[index]! - } - - /// Dequeues element or throws an exception in case queue is empty. - /// - /// - returns: Dequeued element. - mutating func dequeue() -> T? { - if self.count == 0 { - return nil - } - - defer { - let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) - if _count < downsizeLimit && downsizeLimit >= _initialCapacity { - resizeTo(_storage.count / _resizeFactor) - } - } - - return dequeueElementOnly() - } - - /// - returns: Generator of contained elements. - func makeIterator() -> AnyIterator { - var i = dequeueIndex - var count = _count - - return AnyIterator { - if count == 0 { - return nil - } - - defer { - count -= 1 - i += 1 - } - - if i >= self._storage.count { - i -= self._storage.count - } - - return self._storage[i] - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift deleted file mode 100644 index 863636b7b7a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// DeprecationWarner.swift -// Platform -// -// Created by Shai Mishali on 1/9/18. -// Copyright © 2018 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -#if DEBUG - class DeprecationWarner { - private static var warned = Set() - private static var _lock = NSRecursiveLock() - - static func warnIfNeeded(_ kind: Kind) { - _lock.lock(); defer { _lock.unlock() } - guard !warned.contains(kind) else { return } - - warned.insert(kind) - print("ℹ️ [DEPRECATED] \(kind.message)") - } - } - - extension DeprecationWarner { - enum Kind { - case variable - case globalTestFunctionNext - case globalTestFunctionError - case globalTestFunctionCompleted - - var message: String { - switch self { - case .variable: return "`Variable` is planned for future deprecation. Please consider `BehaviorRelay` as a replacement. Read more at: https://git.io/vNqvx" - case .globalTestFunctionNext: return "The `next()` global function is planned for future deprecation. Please use `Recorded.next()` instead." - case .globalTestFunctionError: return "The `error()` global function is planned for future deprecation. Please use `Recorded.error()` instead." - case .globalTestFunctionCompleted: return "The `completed()` global function is planned for future deprecation. Please use `Recorded.completed()` instead." - } - } - } - } -#endif - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift deleted file mode 100644 index 552314a1690..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// DispatchQueue+Extensions.swift -// Platform -// -// Created by Krunoslav Zaher on 10/22/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch - -extension DispatchQueue { - private static var token: DispatchSpecificKey<()> = { - let key = DispatchSpecificKey<()>() - DispatchQueue.main.setSpecific(key: key, value: ()) - return key - }() - - static var isMain: Bool { - return DispatchQueue.getSpecific(key: token) != nil - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift deleted file mode 100644 index 6dc36add7be..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Platform.Darwin.swift -// Platform -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - - import Darwin - import class Foundation.Thread - import protocol Foundation.NSCopying - - extension Thread { - static func setThreadLocalStorageValue(_ value: T?, forKey key: NSCopying) { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - } - - static func getThreadLocalStorageValueForKey(_ key: NSCopying) -> T? { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift deleted file mode 100644 index 570f8f00fa2..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Platform.Linux.swift -// Platform -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(Linux) - - import class Foundation.Thread - - extension Thread { - - static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { - let currentThread = Thread.current - var threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - currentThread.threadDictionary = threadDictionary - } - - static func getThreadLocalStorageValueForKey(_ key: String) -> T? { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift deleted file mode 100644 index c03471d502f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/RecursiveLock.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// RecursiveLock.swift -// Platform -// -// Created by Krunoslav Zaher on 12/18/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSRecursiveLock - -#if TRACE_RESOURCES - class RecursiveLock: NSRecursiveLock { - override init() { - _ = Resources.incrementTotal() - super.init() - } - - override func lock() { - super.lock() - _ = Resources.incrementTotal() - } - - override func unlock() { - super.unlock() - _ = Resources.decrementTotal() - } - - deinit { - _ = Resources.decrementTotal() - } - } -#else - typealias RecursiveLock = NSRecursiveLock -#endif diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/README.md b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/README.md deleted file mode 100644 index 17c8a9523e5..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/README.md +++ /dev/null @@ -1,217 +0,0 @@ -Miss Electric Eel 2016 RxSwift: ReactiveX for Swift -====================================== - -[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-333333.svg) [![pod](https://img.shields.io/cocoapods/v/RxSwift.svg)](https://cocoapods.org/pods/RxSwift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) - -* RxSwift 3.x / Swift 3.x can be found in [**rxswift-3.0** branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0). - -Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. - -This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). - -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. - -Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). - -Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams. - -KVO observing, async operations and streams are all unified under [abstraction of sequence](Documentation/GettingStarted.md#observables-aka-sequences). This is the reason why Rx is so simple, elegant and powerful. - -## I came here because I want to ... - -###### ... understand - -* [why use rx?](Documentation/Why.md) -* [the basics, getting started with RxSwift](Documentation/GettingStarted.md) -* [traits](Documentation/Traits.md) - what are `Single`, `Completable`, `Maybe`, `Driver`, and `ControlProperty` ... and why do they exist? -* [testing](Documentation/UnitTests.md) -* [tips and common errors](Documentation/Tips.md) -* [debugging](Documentation/GettingStarted.md#debugging) -* [the math behind Rx](Documentation/MathBehindRx.md) -* [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) - -###### ... install - -* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) - -###### ... hack around - -* with the example app. [Running Example App](Documentation/ExampleApp.md) -* with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) - -###### ... interact - -* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[Join Slack Channel](http://slack.rxswift.org) -* Report a problem using the library. [Open an Issue With Bug Template](.github/ISSUE_TEMPLATE.md) -* Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) -* Help out [Check out contribution guide](CONTRIBUTING.md) - -###### ... compare - -* [with other libraries](Documentation/ComparisonWithOtherLibraries.md). - - -###### ... find compatible - -* libraries from [RxSwiftCommunity](https://github.com/RxSwiftCommunity). -* [Pods using RxSwift](https://cocoapods.org/?q=uses%3Arxswift). - -###### ... see the broader vision - -* Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) -* Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. - -## Usage - - - - - - - - - - - - - - - - - - - -
Here's an exampleIn Action
Define search for GitHub repositories ...
-let searchResults = searchBar.rx.text.orEmpty
-    .throttle(0.3, scheduler: MainScheduler.instance)
-    .distinctUntilChanged()
-    .flatMapLatest { query -> Observable<[Repository]> in
-        if query.isEmpty {
-            return .just([])
-        }
-        return searchGitHub(query)
-            .catchErrorJustReturn([])
-    }
-    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
-searchResults
-    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
-        (index, repository: Repository, cell) in
-        cell.textLabel?.text = repository.name
-        cell.detailTextLabel?.text = repository.url
-    }
-    .disposed(by: disposeBag)
- - -## Requirements - -* Xcode 9.0 -* Swift 4.0 -* Swift 3.x ([use `rxswift-3.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0) instead) -* Swift 2.3 ([use `rxswift-2.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) instead) - -## Installation - -Rx doesn't contain any external dependencies. - -These are currently the supported options: - -### Manual - -Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build everything and run the sample app - -### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) - -**Tested with `pod --version`: `1.3.1`** - -```ruby -# Podfile -use_frameworks! - -target 'YOUR_TARGET_NAME' do - pod 'RxSwift', '~> 4.0' - pod 'RxCocoa', '~> 4.0' -end - -# RxTest and RxBlocking make the most sense in the context of unit/integration tests -target 'YOUR_TESTING_TARGET' do - pod 'RxBlocking', '~> 4.0' - pod 'RxTest', '~> 4.0' -end -``` - -Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: - -```bash -$ pod install -``` - -### [Carthage](https://github.com/Carthage/Carthage) - -**Tested with `carthage version`: `0.26.2`** - -Add this to `Cartfile` - -``` -github "ReactiveX/RxSwift" ~> 4.0 -``` - -```bash -$ carthage update -``` - -### [Swift Package Manager](https://github.com/apple/swift-package-manager) - -**Tested with `swift build --version`: `Swift 4.0.0-dev (swiftpm-13126)`** - -Create a `Package.swift` file. - -```swift -// swift-tools-version:4.0 - -import PackageDescription - -let package = Package( - name: "RxTestProject", - dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.0.0") - ], - targets: [ - .target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"]) - ] -) -``` - -```bash -$ swift build -``` - -To build or test a module with RxTest dependency, set `TEST=1`. ([RxSwift >= 3.4.2](https://github.com/ReactiveX/RxSwift/releases/tag/3.4.2)) - -```bash -$ TEST=1 swift test -``` - -### Manually using git submodules - -* Add RxSwift as a submodule - -```bash -$ git submodule add git@github.com:ReactiveX/RxSwift.git -``` - -* Drag `Rx.xcodeproj` into Project Navigator -* Go to `Project > Targets > Build Phases > Link Binary With Libraries`, click `+` and select `RxSwift-[Platform]` and `RxCocoa-[Platform]` targets - - -## References - -* [http://reactivex.io/](http://reactivex.io/) -* [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) -* [RxSwift RayWenderlich.com Book](https://store.raywenderlich.com/products/rxswift-reactive-programming-with-swift) -* [Boxue.io RxSwift Online Course](https://boxueio.com/series/rxswift-101) (Chinese 🇨🇳) -* [Erik Meijer (Wikipedia)](http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29) -* [Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx) (video)](https://youtu.be/looJcaeboBY) -* [Reactive Programming Overview (Jafar Husain from Netflix)](https://www.youtube.com/watch?v=dwP1TNXE6fc) -* [Subject/Observer is Dual to Iterator (paper)](http://csl.stanford.edu/~christos/pldi2010.fit/meijer.duality.pdf) -* [Rx standard sequence operators visualized (visualization tool)](http://rxmarbles.com/) -* [Haskell](https://www.haskell.org/) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift deleted file mode 100644 index 85a5efa8fd4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// AnyObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// A type-erased `ObserverType`. -/// -/// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. -public struct AnyObserver : ObserverType { - /// The type of elements in sequence that observer can observe. - public typealias E = Element - - /// Anonymous event handler type. - public typealias EventHandler = (Event) -> Void - - private let observer: EventHandler - - /// Construct an instance whose `on(event)` calls `eventHandler(event)` - /// - /// - parameter eventHandler: Event handler that observes sequences events. - public init(eventHandler: @escaping EventHandler) { - self.observer = eventHandler - } - - /// Construct an instance whose `on(event)` calls `observer.on(event)` - /// - /// - parameter observer: Observer that receives sequence events. - public init(_ observer: O) where O.E == Element { - self.observer = observer.on - } - - /// Send `event` to this observer. - /// - /// - parameter event: Event instance. - public func on(_ event: Event) { - return self.observer(event) - } - - /// Erases type of observer and returns canonical observer. - /// - /// - returns: type erased observer. - public func asObserver() -> AnyObserver { - return self - } -} - -extension AnyObserver { - /// Collection of `AnyObserver`s - typealias s = Bag<(Event) -> Void> -} - -extension ObserverType { - /// Erases type of observer and returns canonical observer. - /// - /// - returns: type erased observer. - public func asObserver() -> AnyObserver { - return AnyObserver(self) - } - - /// Transforms observer of type R to type E using custom transform method. - /// Each event sent to result observer is transformed and sent to `self`. - /// - /// - returns: observer that transforms events. - public func mapObserver(_ transform: @escaping (R) throws -> E) -> AnyObserver { - return AnyObserver { e in - self.on(e.map(transform)) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift deleted file mode 100644 index 1fa7a67726e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Cancelable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents disposable resource with state tracking. -public protocol Cancelable : Disposable { - /// Was resource disposed. - var isDisposed: Bool { get } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift deleted file mode 100644 index 80332dbc4f0..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// AsyncLock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -In case nobody holds this lock, the work will be queued and executed immediately -on thread that is requesting lock. - -In case there is somebody currently holding that lock, action will be enqueued. -When owned of the lock finishes with it's processing, it will also execute -and pending work. - -That means that enqueued work could possibly be executed later on a different thread. -*/ -final class AsyncLock - : Disposable - , Lock - , SynchronizedDisposeType { - typealias Action = () -> Void - - var _lock = SpinLock() - - private var _queue: Queue = Queue(capacity: 0) - - private var _isExecuting: Bool = false - private var _hasFaulted: Bool = false - - // lock { - func lock() { - self._lock.lock() - } - - func unlock() { - self._lock.unlock() - } - // } - - private func enqueue(_ action: I) -> I? { - self._lock.lock(); defer { self._lock.unlock() } // { - if self._hasFaulted { - return nil - } - - if self._isExecuting { - self._queue.enqueue(action) - return nil - } - - self._isExecuting = true - - return action - // } - } - - private func dequeue() -> I? { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self._queue.isEmpty { - return self._queue.dequeue() - } - else { - self._isExecuting = false - return nil - } - // } - } - - func invoke(_ action: I) { - let firstEnqueuedAction = self.enqueue(action) - - if let firstEnqueuedAction = firstEnqueuedAction { - firstEnqueuedAction.invoke() - } - else { - // action is enqueued, it's somebody else's concern now - return - } - - while true { - let nextAction = self.dequeue() - - if let nextAction = nextAction { - nextAction.invoke() - } - else { - return - } - } - } - - func dispose() { - self.synchronizedDispose() - } - - func _synchronized_dispose() { - self._queue = Queue(capacity: 0) - self._hasFaulted = true - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift deleted file mode 100644 index b26f5b75016..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Lock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol Lock { - func lock() - func unlock() -} - -// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html -typealias SpinLock = RecursiveLock - -extension RecursiveLock : Lock { - @inline(__always) - final func performLocked(_ action: () -> Void) { - self.lock(); defer { self.unlock() } - action() - } - - @inline(__always) - final func calculateLocked(_ action: () -> T) -> T { - self.lock(); defer { self.unlock() } - return action() - } - - @inline(__always) - final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { - self.lock(); defer { self.unlock() } - let result = try action() - return result - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift deleted file mode 100644 index ed6b28a780d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// LockOwnerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol LockOwnerType : class, Lock { - var _lock: RecursiveLock { get } -} - -extension LockOwnerType { - func lock() { - self._lock.lock() - } - - func unlock() { - self._lock.unlock() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift deleted file mode 100644 index 0490a69ba87..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedDisposeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedDisposeType : class, Disposable, Lock { - func _synchronized_dispose() -} - -extension SynchronizedDisposeType { - func synchronizedDispose() { - self.lock(); defer { self.unlock() } - self._synchronized_dispose() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift deleted file mode 100644 index 33aa84fc51e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedOnType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedOnType : class, ObserverType, Lock { - func _synchronized_on(_ event: Event) -} - -extension SynchronizedOnType { - func synchronizedOn(_ event: Event) { - self.lock(); defer { self.unlock() } - self._synchronized_on(event) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift deleted file mode 100644 index bb1aa7e47df..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SynchronizedUnsubscribeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedUnsubscribeType : class { - associatedtype DisposeKey - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift deleted file mode 100644 index 52bf93c5686..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ConnectableObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. -*/ -public protocol ConnectableObservableType : ObservableType { - /** - Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. - - - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - */ - func connect() -> Disposable -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift deleted file mode 100644 index cb410906eca..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// Deprecated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/5/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension Observable { - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:)") - public static func from(_ optional: E?) -> Observable { - return Observable.from(optional: optional) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:scheduler:)") - public static func from(_ optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return Observable.from(optional: optional, scheduler: scheduler) - } -} - -extension ObservableType { - /** - - Projects each element of an observable sequence into a new form by incorporating the element's index. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. - */ - @available(*, deprecated, message: "Please use enumerated().map()") - public func mapWithIndex(_ selector: @escaping (E, Int) throws -> R) - -> Observable { - return self.enumerated().map { try selector($0.element, $0.index) } - } - - - /** - - Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - @available(*, deprecated, message: "Please use enumerated().flatMap()") - public func flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) - -> Observable { - return self.enumerated().flatMap { try selector($0.element, $0.index) } - } - - /** - - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - The element's index is used in the logic of the predicate function. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - @available(*, deprecated, message: "Please use enumerated().skipWhile().map()") - public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return self.enumerated().skipWhile { try predicate($0.element, $0.index) }.map { $0.element } - } - - - /** - - Returns elements from an observable sequence as long as a specified condition is true. - - The element's index is used in the logic of the predicate function. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - @available(*, deprecated, message: "Please use enumerated().takeWhile().map()") - public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return self.enumerated().takeWhile { try predicate($0.element, $0.index) }.map { $0.element } - } -} - -extension Disposable { - /// Deprecated in favor of `disposed(by:)` - /// - /// - /// Adds `self` to `bag`. - /// - /// - parameter bag: `DisposeBag` to add `self` to. - @available(*, deprecated, message: "use disposed(by:) instead", renamed: "disposed(by:)") - public func addDisposableTo(_ bag: DisposeBag) { - self.disposed(by: bag) - } -} - - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays latest element in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - @available(*, deprecated, message: "use share(replay: 1) instead", renamed: "share(replay:)") - public func shareReplayLatestWhileConnected() - -> Observable { - return self.share(replay: 1, scope: .whileConnected) - } -} - - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - @available(*, deprecated, message: "Suggested replacement is `share(replay: 1)`. In case old 3.x behavior of `shareReplay` is required please use `share(replay: 1, scope: .forever)` instead.", renamed: "share(replay:)") - public func shareReplay(_ bufferSize: Int) - -> Observable { - return self.share(replay: bufferSize, scope: .forever) - } -} - -/// Variable is a wrapper for `BehaviorSubject`. -/// -/// Unlike `BehaviorSubject` it can't terminate with error, and when variable is deallocated -/// it will complete its observable sequence (`asObservable`). -/// -/// **This concept will be deprecated from RxSwift but offical migration path hasn't been decided yet.** -/// https://github.com/ReactiveX/RxSwift/issues/1501 -/// -/// Current recommended replacement for this API is `RxCocoa.BehaviorRelay` because: -/// * `Variable` isn't a standard cross platform concept, hence it's out of place in RxSwift target. -/// * It doesn't have a counterpart for handling events (`PublishRelay`). It models state only. -/// * It doesn't have a consistent naming with *Relay or other Rx concepts. -/// * It has an inconsistent memory management model compared to other parts of RxSwift (completes on `deinit`). -/// -/// Once plans are finalized, official availability attribute will be added in one of upcoming versions. -public final class Variable { - - public typealias E = Element - - private let _subject: BehaviorSubject - - private var _lock = SpinLock() - - // state - private var _value: E - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - /// Gets or sets current value of variable. - /// - /// Whenever a new value is set, all the observers are notified of the change. - /// - /// Even if the newly set value is same as the old value, observers are still notified for change. - public var value: E { - get { - self._lock.lock(); defer { self._lock.unlock() } - return self._value - } - set(newValue) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .variable) - defer { self._synchronizationTracker.unregister() } - #endif - self._lock.lock() - self._value = newValue - self._lock.unlock() - - self._subject.on(.next(newValue)) - } - } - - /// Initializes variable with initial value. - /// - /// - parameter value: Initial variable value. - public init(_ value: Element) { - #if DEBUG - DeprecationWarner.warnIfNeeded(.variable) - #endif - - self._value = value - self._subject = BehaviorSubject(value: value) - } - - /// - returns: Canonical interface for push style sequence - public func asObservable() -> Observable { - return self._subject - } - - deinit { - self._subject.on(.completed) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposable.swift deleted file mode 100644 index b79c77a7581..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource. -public protocol Disposable { - /// Dispose resource. - func dispose() -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift deleted file mode 100644 index 6fbd6355506..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// AnonymousDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an Action-based disposable. -/// -/// When dispose method is called, disposal action will be dereferenced. -fileprivate final class AnonymousDisposable : DisposeBase, Cancelable { - public typealias DisposeAction = () -> Void - - private let _isDisposed = AtomicInt(0) - private var _disposeAction: DisposeAction? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /// Constructs a new disposable with the given action used for disposal. - /// - /// - parameter disposeAction: Disposal action which will be run upon calling `dispose`. - fileprivate init(_ disposeAction: @escaping DisposeAction) { - self._disposeAction = disposeAction - super.init() - } - - // Non-deprecated version of the constructor, used by `Disposables.create(with:)` - fileprivate init(disposeAction: @escaping DisposeAction) { - self._disposeAction = disposeAction - super.init() - } - - /// Calls the disposal action if and only if the current instance hasn't been disposed yet. - /// - /// After invoking disposal action, disposal action will be dereferenced. - fileprivate func dispose() { - if fetchOr(self._isDisposed, 1) == 0 { - if let action = self._disposeAction { - self._disposeAction = nil - action() - } - } - } -} - -extension Disposables { - - /// Constructs a new disposable with the given action used for disposal. - /// - /// - parameter dispose: Disposal action which will be run upon calling `dispose`. - public static func create(with dispose: @escaping () -> Void) -> Cancelable { - return AnonymousDisposable(disposeAction: dispose) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift deleted file mode 100644 index 5693268d2a2..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// BinaryDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents two disposable resources that are disposed together. -private final class BinaryDisposable : DisposeBase, Cancelable { - - private let _isDisposed = AtomicInt(0) - - // state - private var _disposable1: Disposable? - private var _disposable2: Disposable? - - /// - returns: Was resource disposed. - var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /// Constructs new binary disposable from two disposables. - /// - /// - parameter disposable1: First disposable - /// - parameter disposable2: Second disposable - init(_ disposable1: Disposable, _ disposable2: Disposable) { - self._disposable1 = disposable1 - self._disposable2 = disposable2 - super.init() - } - - /// Calls the disposal action if and only if the current instance hasn't been disposed yet. - /// - /// After invoking disposal action, disposal action will be dereferenced. - func dispose() { - if fetchOr(self._isDisposed, 1) == 0 { - self._disposable1?.dispose() - self._disposable2?.dispose() - self._disposable1 = nil - self._disposable2 = nil - } - } -} - -extension Disposables { - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { - return BinaryDisposable(disposable1, disposable2) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift deleted file mode 100644 index a0f5c2fb866..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// BooleanDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource that can be checked for disposal status. -public final class BooleanDisposable : Cancelable { - - internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) - private var _isDisposed = false - - /// Initializes a new instance of the `BooleanDisposable` class - public init() { - } - - /// Initializes a new instance of the `BooleanDisposable` class with given value - public init(isDisposed: Bool) { - self._isDisposed = isDisposed - } - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return self._isDisposed - } - - /// Sets the status to disposed, which can be observer through the `isDisposed` property. - public func dispose() { - self._isDisposed = true - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift deleted file mode 100644 index ce0da6a7c62..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CompositeDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a group of disposable resources that are disposed together. -public final class CompositeDisposable : DisposeBase, Cancelable { - /// Key used to remove disposable from composite disposable - public struct DisposeKey { - fileprivate let key: BagKey - fileprivate init(key: BagKey) { - self.key = key - } - } - - private var _lock = SpinLock() - - // state - private var _disposables: Bag? = Bag() - - public var isDisposed: Bool { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables == nil - } - - public override init() { - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - _ = self._disposables!.insert(disposable3) - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposable4: Disposable, _ disposables: Disposable...) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - _ = self._disposables!.insert(disposable3) - _ = self._disposables!.insert(disposable4) - - for disposable in disposables { - _ = self._disposables!.insert(disposable) - } - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(disposables: [Disposable]) { - for disposable in disposables { - _ = self._disposables!.insert(disposable) - } - } - - /** - Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - - - parameter disposable: Disposable to add. - - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already - disposed `nil` will be returned. - */ - public func insert(_ disposable: Disposable) -> DisposeKey? { - let key = self._insert(disposable) - - if key == nil { - disposable.dispose() - } - - return key - } - - private func _insert(_ disposable: Disposable) -> DisposeKey? { - self._lock.lock(); defer { self._lock.unlock() } - - let bagKey = self._disposables?.insert(disposable) - return bagKey.map(DisposeKey.init) - } - - /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. - public var count: Int { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables?.count ?? 0 - } - - /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - /// - /// - parameter disposeKey: Key used to identify disposable to be removed. - public func remove(for disposeKey: DisposeKey) { - self._remove(for: disposeKey)?.dispose() - } - - private func _remove(for disposeKey: DisposeKey) -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables?.removeKey(disposeKey.key) - } - - /// Disposes all disposables in the group and removes them from the group. - public func dispose() { - if let disposables = self._dispose() { - disposeAll(in: disposables) - } - } - - private func _dispose() -> Bag? { - self._lock.lock(); defer { self._lock.unlock() } - - let disposeBag = self._disposables - self._disposables = nil - - return disposeBag - } -} - -extension Disposables { - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { - return CompositeDisposable(disposable1, disposable2, disposable3) - } - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { - var disposables = disposables - disposables.append(disposable1) - disposables.append(disposable2) - disposables.append(disposable3) - return CompositeDisposable(disposables: disposables) - } - - /// Creates a disposable with the given disposables. - public static func create(_ disposables: [Disposable]) -> Cancelable { - switch disposables.count { - case 2: - return Disposables.create(disposables[0], disposables[1]) - default: - return CompositeDisposable(disposables: disposables) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift deleted file mode 100644 index 8cd6e28c3c9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposables.swift -// RxSwift -// -// Created by Mohsen Ramezanpoor on 01/08/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/// A collection of utility methods for common disposable operations. -public struct Disposables { - private init() {} -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift deleted file mode 100644 index 22e5cb02f98..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// DisposeBag.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension Disposable { - /// Adds `self` to `bag` - /// - /// - parameter bag: `DisposeBag` to add `self` to. - public func disposed(by bag: DisposeBag) { - bag.insert(self) - } -} - -/** -Thread safe bag that disposes added disposables on `deinit`. - -This returns ARC (RAII) like resource management to `RxSwift`. - -In case contained disposables need to be disposed, just put a different dispose bag -or create a new one in its place. - - self.existingDisposeBag = DisposeBag() - -In case explicit disposal is necessary, there is also `CompositeDisposable`. -*/ -public final class DisposeBag: DisposeBase { - - private var _lock = SpinLock() - - // state - fileprivate var _disposables = [Disposable]() - fileprivate var _isDisposed = false - - /// Constructs new empty dispose bag. - public override init() { - super.init() - } - - /// Adds `disposable` to be disposed when dispose bag is being deinited. - /// - /// - parameter disposable: Disposable to add. - public func insert(_ disposable: Disposable) { - self._insert(disposable)?.dispose() - } - - private func _insert(_ disposable: Disposable) -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - return disposable - } - - self._disposables.append(disposable) - - return nil - } - - /// This is internal on purpose, take a look at `CompositeDisposable` instead. - private func dispose() { - let oldDisposables = self._dispose() - - for disposable in oldDisposables { - disposable.dispose() - } - } - - private func _dispose() -> [Disposable] { - self._lock.lock(); defer { self._lock.unlock() } - - let disposables = self._disposables - - self._disposables.removeAll(keepingCapacity: false) - self._isDisposed = true - - return disposables - } - - deinit { - self.dispose() - } -} - -extension DisposeBag { - - /// Convenience init allows a list of disposables to be gathered for disposal. - public convenience init(disposing disposables: Disposable...) { - self.init() - self._disposables += disposables - } - - /// Convenience init allows an array of disposables to be gathered for disposal. - public convenience init(disposing disposables: [Disposable]) { - self.init() - self._disposables += disposables - } - - /// Convenience function allows a list of disposables to be gathered for disposal. - public func insert(_ disposables: Disposable...) { - self.insert(disposables) - } - - /// Convenience function allows an array of disposables to be gathered for disposal. - public func insert(_ disposables: [Disposable]) { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - disposables.forEach { $0.dispose() } - } else { - self._disposables += disposables - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift deleted file mode 100644 index 0d4b2fb7f9b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// DisposeBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for all disposables. -public class DisposeBase { - init() { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift deleted file mode 100644 index 149f8664342..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// NopDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable that does nothing on disposal. -/// -/// Nop = No Operation -fileprivate struct NopDisposable : Disposable { - - fileprivate static let noOp: Disposable = NopDisposable() - - fileprivate init() { - - } - - /// Does nothing. - public func dispose() { - } -} - -extension Disposables { - /** - Creates a disposable that does nothing on disposal. - */ - static public func create() -> Disposable { - return NopDisposable.noOp - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift deleted file mode 100644 index 922f20a6db0..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// RefCountDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. -public final class RefCountDisposable : DisposeBase, Cancelable { - private var _lock = SpinLock() - private var _disposable = nil as Disposable? - private var _primaryDisposed = false - private var _count = 0 - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposable == nil - } - - /// Initializes a new instance of the `RefCountDisposable`. - public init(disposable: Disposable) { - self._disposable = disposable - super.init() - } - - /** - Holds a dependent disposable that when disposed decreases the refcount on the underlying disposable. - - When getter is called, a dependent disposable contributing to the reference count that manages the underlying disposable's lifetime is returned. - */ - public func retain() -> Disposable { - return self._lock.calculateLocked { - if self._disposable != nil { - do { - _ = try incrementChecked(&self._count) - } catch { - rxFatalError("RefCountDisposable increment failed") - } - - return RefCountInnerDisposable(self) - } else { - return Disposables.create() - } - } - } - - /// Disposes the underlying disposable only when all dependent disposables have been disposed. - public func dispose() { - let oldDisposable: Disposable? = self._lock.calculateLocked { - if let oldDisposable = self._disposable, !self._primaryDisposed { - self._primaryDisposed = true - - if self._count == 0 { - self._disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } - - fileprivate func release() { - let oldDisposable: Disposable? = self._lock.calculateLocked { - if let oldDisposable = self._disposable { - do { - _ = try decrementChecked(&self._count) - } catch { - rxFatalError("RefCountDisposable decrement on release failed") - } - - guard self._count >= 0 else { - rxFatalError("RefCountDisposable counter is lower than 0") - } - - if self._primaryDisposed && self._count == 0 { - self._disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } -} - -internal final class RefCountInnerDisposable: DisposeBase, Disposable -{ - private let _parent: RefCountDisposable - private let _isDisposed = AtomicInt(0) - - init(_ parent: RefCountDisposable) { - self._parent = parent - super.init() - } - - internal func dispose() - { - if fetchOr(self._isDisposed, 1) == 0 { - self._parent.release() - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift deleted file mode 100644 index c834f5be1b0..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ScheduledDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in - sd.disposeInner() - return Disposables.create() -} - -/// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. -public final class ScheduledDisposable : Cancelable { - public let scheduler: ImmediateSchedulerType - - private let _isDisposed = AtomicInt(0) - - // state - private var _disposable: Disposable? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /** - Initializes a new instance of the `ScheduledDisposable` that uses a `scheduler` on which to dispose the `disposable`. - - - parameter scheduler: Scheduler where the disposable resource will be disposed on. - - parameter disposable: Disposable resource to dispose on the given scheduler. - */ - public init(scheduler: ImmediateSchedulerType, disposable: Disposable) { - self.scheduler = scheduler - self._disposable = disposable - } - - /// Disposes the wrapped disposable on the provided scheduler. - public func dispose() { - _ = self.scheduler.schedule(self, action: disposeScheduledDisposable) - } - - func disposeInner() { - if fetchOr(self._isDisposed, 1) == 0 { - self._disposable!.dispose() - self._disposable = nil - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift deleted file mode 100644 index 22dce3620b1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// SerialDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. -public final class SerialDisposable : DisposeBase, Cancelable { - private var _lock = SpinLock() - - // state - private var _current = nil as Disposable? - private var _isDisposed = false - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return self._isDisposed - } - - /// Initializes a new instance of the `SerialDisposable`. - override public init() { - super.init() - } - - /** - Gets or sets the underlying disposable. - - Assigning this property disposes the previous disposable object. - - If the `SerialDisposable` has already been disposed, assignment to this property causes immediate disposal of the given disposable object. - */ - public var disposable: Disposable { - get { - return self._lock.calculateLocked { - return self._current ?? Disposables.create() - } - } - set (newDisposable) { - let disposable: Disposable? = self._lock.calculateLocked { - if self._isDisposed { - return newDisposable - } - else { - let toDispose = self._current - self._current = newDisposable - return toDispose - } - } - - if let disposable = disposable { - disposable.dispose() - } - } - } - - /// Disposes the underlying disposable as well as all future replacements. - public func dispose() { - self._dispose()?.dispose() - } - - private func _dispose() -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - return nil - } - else { - self._isDisposed = true - let current = self._current - self._current = nil - return current - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift deleted file mode 100644 index 88d59dbe31a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// SingleAssignmentDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Represents a disposable resource which only allows a single assignment of its underlying disposable resource. - -If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an exception. -*/ -public final class SingleAssignmentDisposable : DisposeBase, Cancelable { - - fileprivate enum DisposeState: Int32 { - case disposed = 1 - case disposableSet = 2 - } - - // state - private let _state = AtomicInt(0) - private var _disposable = nil as Disposable? - - /// - returns: A value that indicates whether the object is disposed. - public var isDisposed: Bool { - return isFlagSet(self._state, DisposeState.disposed.rawValue) - } - - /// Initializes a new instance of the `SingleAssignmentDisposable`. - public override init() { - super.init() - } - - /// Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. - /// - /// **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** - public func setDisposable(_ disposable: Disposable) { - self._disposable = disposable - - let previousState = fetchOr(self._state, DisposeState.disposableSet.rawValue) - - if (previousState & DisposeState.disposableSet.rawValue) != 0 { - rxFatalError("oldState.disposable != nil") - } - - if (previousState & DisposeState.disposed.rawValue) != 0 { - disposable.dispose() - self._disposable = nil - } - } - - /// Disposes the underlying disposable. - public func dispose() { - let previousState = fetchOr(self._state, DisposeState.disposed.rawValue) - - if (previousState & DisposeState.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeState.disposableSet.rawValue) != 0 { - guard let disposable = self._disposable else { - rxFatalError("Disposable not set") - } - disposable.dispose() - self._disposable = nil - } - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift deleted file mode 100644 index 430e4c6b550..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SubscriptionDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct SubscriptionDisposable : Disposable { - private let _key: T.DisposeKey - private weak var _owner: T? - - init(owner: T, key: T.DisposeKey) { - self._owner = owner - self._key = key - } - - func dispose() { - self._owner?.synchronizedUnsubscribe(self._key) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift deleted file mode 100644 index f17b52d882a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Errors.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -let RxErrorDomain = "RxErrorDomain" -let RxCompositeFailures = "RxCompositeFailures" - -/// Generic Rx error codes. -public enum RxError - : Swift.Error - , CustomDebugStringConvertible { - /// Unknown error occurred. - case unknown - /// Performing an action on disposed object. - case disposed(object: AnyObject) - /// Aritmetic overflow error. - case overflow - /// Argument out of range error. - case argumentOutOfRange - /// Sequence doesn't contain any elements. - case noElements - /// Sequence contains more than one element. - case moreThanOneElement - /// Timeout error. - case timeout -} - -extension RxError { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - switch self { - case .unknown: - return "Unknown error occurred." - case .disposed(let object): - return "Object `\(object)` was already disposed." - case .overflow: - return "Arithmetic overflow occurred." - case .argumentOutOfRange: - return "Argument out of range." - case .noElements: - return "Sequence doesn't contain any elements." - case .moreThanOneElement: - return "Sequence contains more than one element." - case .timeout: - return "Sequence timeout." - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift deleted file mode 100644 index 9193e3504d4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// Event.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a sequence event. -/// -/// Sequence grammar: -/// **next\* (error | completed)** -public enum Event { - /// Next element is produced. - case next(Element) - - /// Sequence terminated with an error. - case error(Swift.Error) - - /// Sequence completed successfully. - case completed -} - -extension Event : CustomDebugStringConvertible { - /// Description of event. - public var debugDescription: String { - switch self { - case .next(let value): - return "next(\(value))" - case .error(let error): - return "error(\(error))" - case .completed: - return "completed" - } - } -} - -extension Event { - /// Is `completed` or `error` event. - public var isStopEvent: Bool { - switch self { - case .next: return false - case .error, .completed: return true - } - } - - /// If `next` event, returns element value. - public var element: Element? { - if case .next(let value) = self { - return value - } - return nil - } - - /// If `error` event, returns error. - public var error: Swift.Error? { - if case .error(let error) = self { - return error - } - return nil - } - - /// If `completed` event, returns `true`. - public var isCompleted: Bool { - if case .completed = self { - return true - } - return false - } -} - -extension Event { - /// Maps sequence elements using transform. If error happens during the transform, `.error` - /// will be returned as value. - public func map(_ transform: (Element) throws -> Result) -> Event { - do { - switch self { - case let .next(element): - return .next(try transform(element)) - case let .error(error): - return .error(error) - case .completed: - return .completed - } - } - catch let e { - return .error(e) - } - } -} - -/// A type that can be converted to `Event`. -public protocol EventConvertible { - /// Type of element in event - associatedtype ElementType - - /// Event representation of this instance - var event: Event { get } -} - -extension Event : EventConvertible { - /// Event representation of this instance - public var event: Event { - return self - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift deleted file mode 100644 index fc9b22cd7f8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// Bag+Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/19/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - - -// MARK: forEach - -@inline(__always) -func dispatch(_ bag: Bag<(Event) -> Void>, _ event: Event) { - bag._value0?(event) - - if bag._onlyFastPath { - return - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value(event) - } - - if let dictionary = bag._dictionary { - for element in dictionary.values { - element(event) - } - } -} - -/// Dispatches `dispose` to all disposables contained inside bag. -func disposeAll(in bag: Bag) { - bag._value0?.dispose() - - if bag._onlyFastPath { - return - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value.dispose() - } - - if let dictionary = bag._dictionary { - for element in dictionary.values { - element.dispose() - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift deleted file mode 100644 index 70d4786cbb1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// String+Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension String { - /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` - func lastIndexOf(_ character: Character) -> Index? { - var index = self.endIndex - while index > self.startIndex { - index = self.index(before: index) - if self[index] == character { - return index - } - } - - return nil - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift deleted file mode 100644 index c5b0a9d6d10..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// GroupedObservable.swift -// RxSwift -// -// Created by Tomi Koskinen on 01/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an observable sequence of elements that have a common key. -public struct GroupedObservable : ObservableType { - public typealias E = Element - - /// Gets the common key. - public let key: Key - - private let source: Observable - - /// Initializes grouped observable sequence with key and source observable sequence. - /// - /// - parameter key: Grouped observable sequence key - /// - parameter source: Observable sequence that represents sequence of elements for the key - /// - returns: Grouped observable sequence of elements for the specific key - public init(key: Key, source: Observable) { - self.key = key - self.source = source - } - - /// Subscribes `observer` to receive events for this sequence. - public func subscribe(_ observer: O) -> Disposable where O.E == E { - return self.source.subscribe(observer) - } - - /// Converts `self` to `Observable` sequence. - public func asObservable() -> Observable { - return self.source - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift deleted file mode 100644 index 954fbf04b2a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ImmediateSchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an object that immediately schedules units of work. -public protocol ImmediateSchedulerType { - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable -} - -extension ImmediateSchedulerType { - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> Void) -> Void) -> Disposable { - let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) - - recursiveScheduler.schedule(state) - - return Disposables.create(with: recursiveScheduler.dispose) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift deleted file mode 100644 index 08caab43765..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Observable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// A type-erased `ObservableType`. -/// -/// It represents a push style sequence. -public class Observable : ObservableType { - /// Type of elements in sequence. - public typealias E = Element - - init() { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - public func subscribe(_ observer: O) -> Disposable where O.E == E { - rxAbstractMethod() - } - - public func asObservable() -> Observable { - return self - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } - - // this is kind of ugly I know :( - // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ - - /// Optimizations for map operator - internal func composeMap(_ transform: @escaping (Element) throws -> R) -> Observable { - return _map(source: self, transform: transform) - } -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift deleted file mode 100644 index d89c5aa70b9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ObservableConvertibleType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Type that can be converted to observable sequence (`Observable`). -public protocol ObservableConvertibleType { - /// Type of elements in sequence. - associatedtype E - - /// Converts `self` to `Observable` sequence. - /// - /// - returns: Observable sequence that represents `self`. - func asObservable() -> Observable -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift deleted file mode 100644 index 362fc58a5ad..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// ObservableType+Extensions.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if DEBUG - import Foundation -#endif - -extension ObservableType { - /** - Subscribes an event handler to an observable sequence. - - - parameter on: Action to invoke for each event in the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(_ on: @escaping (Event) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - on(e) - } - return self.asObservable().subscribe(observer) - } - - - /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - gracefully completed, errored, or if the generation is canceled by disposing subscription). - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) - -> Disposable { - let disposable: Disposable - - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } - - #if DEBUG - let synchronizationTracker = SynchronizationTracker() - #endif - - let callStack = Hooks.recordCallStackOnError ? Hooks.customCaptureSubscriptionCallstack() : [] - - let observer = AnonymousObserver { event in - - #if DEBUG - synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { synchronizationTracker.unregister() } - #endif - - switch event { - case .next(let value): - onNext?(value) - case .error(let error): - if let onError = onError { - onError(error) - } - else { - Hooks.defaultErrorHandler(callStack, error) - } - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() - } - } - return Disposables.create( - self.asObservable().subscribe(observer), - disposable - ) - } -} - -import class Foundation.NSRecursiveLock - -extension Hooks { - public typealias DefaultErrorHandler = (_ subscriptionCallStack: [String], _ error: Error) -> Void - public typealias CustomCaptureSubscriptionCallstack = () -> [String] - - fileprivate static let _lock = RecursiveLock() - fileprivate static var _defaultErrorHandler: DefaultErrorHandler = { subscriptionCallStack, error in - #if DEBUG - let serializedCallStack = subscriptionCallStack.joined(separator: "\n") - print("Unhandled error happened: \(error)\n subscription called from:\n\(serializedCallStack)") - #endif - } - fileprivate static var _customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack = { - #if DEBUG - return Thread.callStackSymbols - #else - return [] - #endif - } - - /// Error handler called in case onError handler wasn't provided. - public static var defaultErrorHandler: DefaultErrorHandler { - get { - _lock.lock(); defer { _lock.unlock() } - return _defaultErrorHandler - } - set { - _lock.lock(); defer { _lock.unlock() } - _defaultErrorHandler = newValue - } - } - - /// Subscription callstack block to fetch custom callstack information. - public static var customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack { - get { - _lock.lock(); defer { _lock.unlock() } - return _customCaptureSubscriptionCallstack - } - set { - _lock.lock(); defer { _lock.unlock() } - _customCaptureSubscriptionCallstack = newValue - } - } -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift deleted file mode 100644 index e41a36a1ae6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a push style sequence. -public protocol ObservableType : ObservableConvertibleType { - /** - Subscribes `observer` to receive events for this sequence. - - ### Grammar - - **Next\* (Error | Completed)?** - - * sequences can produce zero or more elements so zero or more `Next` events can be sent to `observer` - * once an `Error` or `Completed` event is sent, the sequence terminates and can't produce any other elements - - It is possible that events are sent from different threads, but no two events can be sent concurrently to - `observer`. - - ### Resource Management - - When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements - will be freed. - - To cancel production of sequence elements and free resources immediately, call `dispose` on returned - subscription. - - - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. - */ - func subscribe(_ observer: O) -> Disposable where O.E == E -} - -extension ObservableType { - - /// Default implementation of converting `ObservableType` to `Observable`. - public func asObservable() -> Observable { - // temporary workaround - //return Observable.create(subscribe: self.subscribe) - return Observable.create { o in - return self.subscribe(o) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift deleted file mode 100644 index a69147c8491..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// AddRef.swift -// RxSwift -// -// Created by Junior B. on 30/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AddRefSink : Sink, ObserverType { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .completed, .error: - self.forwardOn(event) - self.dispose() - } - } -} - -final class AddRef : Producer { - - private let _source: Observable - private let _refCount: RefCountDisposable - - init(source: Observable, refCount: RefCountDisposable) { - self._source = source - self._refCount = refCount - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let releaseDisposable = self._refCount.retain() - let sink = AddRefSink(observer: observer, cancel: cancel) - let subscription = Disposables.create(releaseDisposable, self._source.subscribe(sink)) - - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift deleted file mode 100644 index b4b9b7ee902..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// Amb.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - public static func amb(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return sequence.reduce(Observable.never()) { a, o in - return a.amb(o.asObservable()) - } - } -} - -extension ObservableType { - - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - parameter right: Second observable sequence. - - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. - */ - public func amb - (_ right: O2) - -> Observable where O2.E == E { - return Amb(left: self.asObservable(), right: right.asObservable()) - } -} - -fileprivate enum AmbState { - case neither - case left - case right -} - -final private class AmbObserver: ObserverType { - typealias Element = O.E - typealias Parent = AmbSink - typealias This = AmbObserver - typealias Sink = (This, Event) -> Void - - fileprivate let _parent: Parent - fileprivate var _sink: Sink - fileprivate var _cancel: Disposable - - init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - - self._parent = parent - self._sink = sink - self._cancel = cancel - } - - func on(_ event: Event) { - self._sink(self, event) - if event.isStopEvent { - self._cancel.dispose() - } - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} - -final private class AmbSink: Sink { - typealias ElementType = O.E - typealias Parent = Amb - typealias AmbObserverType = AmbObserver - - private let _parent: Parent - - private let _lock = RecursiveLock() - // state - private var _choice = AmbState.neither - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let disposeAll = Disposables.create(subscription1, subscription2) - - let forwardEvent = { (o: AmbObserverType, event: Event) -> Void in - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - - let decide = { (o: AmbObserverType, event: Event, me: AmbState, otherSubscription: Disposable) in - self._lock.performLocked { - if self._choice == .neither { - self._choice = me - o._sink = forwardEvent - o._cancel = disposeAll - otherSubscription.dispose() - } - - if self._choice == me { - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - } - } - - let sink1 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .left, subscription2) - } - - let sink2 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .right, subscription1) - } - - subscription1.setDisposable(self._parent._left.subscribe(sink1)) - subscription2.setDisposable(self._parent._right.subscribe(sink2)) - - return disposeAll - } -} - -final private class Amb: Producer { - fileprivate let _left: Observable - fileprivate let _right: Observable - - init(left: Observable, right: Observable) { - self._left = left - self._right = right - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AmbSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift deleted file mode 100644 index d9010dd4331..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AsMaybe.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class AsMaybeSink : Sink, ObserverType { - typealias ElementType = O.E - typealias E = ElementType - - private var _element: Event? - - func on(_ event: Event) { - switch event { - case .next: - if self._element != nil { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - } - - self._element = event - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if let element = self._element { - self.forwardOn(element) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class AsMaybe: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsMaybeSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift deleted file mode 100644 index 8682f1fb0ae..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// AsSingle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class AsSingleSink : Sink, ObserverType { - typealias ElementType = O.E - typealias E = ElementType - - private var _element: Event? - - func on(_ event: Event) { - switch event { - case .next: - if self._element != nil { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - } - - self._element = event - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if let element = self._element { - self.forwardOn(element) - self.forwardOn(.completed) - } - else { - self.forwardOn(.error(RxError.noElements)) - } - self.dispose() - } - } -} - -final class AsSingle: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsSingleSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift deleted file mode 100644 index db4cf210758..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// Buffer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. - - A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first. - - - seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html) - - - parameter timeSpan: Maximum time length of a buffer. - - parameter count: Maximum element count of a buffer. - - parameter scheduler: Scheduler to run buffering timers on. - - returns: An observable sequence of buffers. - */ - public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[E]> { - return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final private class BufferTimeCount: Producer<[Element]> { - - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - self._source = source - self._timeSpan = timeSpan - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { - let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class BufferTimeCountSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == [Element] { - typealias Parent = BufferTimeCount - typealias E = Element - - private let _parent: Parent - - let _lock = RecursiveLock() - - // state - private let _timerD = SerialDisposable() - private var _buffer = [Element]() - private var _windowID = 0 - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self.createTimer(self._windowID) - return Disposables.create(_timerD, _parent._source.subscribe(self)) - } - - func startNewWindowAndSendCurrentOne() { - self._windowID = self._windowID &+ 1 - let windowID = self._windowID - - let buffer = self._buffer - self._buffer = [] - self.forwardOn(.next(buffer)) - - self.createTimer(windowID) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._buffer.append(element) - - if self._buffer.count == self._parent._count { - self.startNewWindowAndSendCurrentOne() - } - - case .error(let error): - self._buffer = [] - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.next(self._buffer)) - self.forwardOn(.completed) - self.dispose() - } - } - - func createTimer(_ windowID: Int) { - if self._timerD.isDisposed { - return - } - - if self._windowID != windowID { - return - } - - let nextTimer = SingleAssignmentDisposable() - - self._timerD.disposable = nextTimer - - let disposable = self._parent._scheduler.scheduleRelative(windowID, dueTime: self._parent._timeSpan) { previousWindowID in - self._lock.performLocked { - if previousWindowID != self._windowID { - return - } - - self.startNewWindowAndSendCurrentOne() - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposable) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift deleted file mode 100644 index 13060767572..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift +++ /dev/null @@ -1,235 +0,0 @@ -// -// Catch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter handler: Error handler function, producing another observable sequence. - - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. - */ - public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) - -> Observable { - return Catch(source: self.asObservable(), handler: handler) - } - - /** - Continues an observable sequence that is terminated by an error with a single element. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter element: Last element in an observable sequence in case error occurs. - - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. - */ - public func catchErrorJustReturn(_ element: E) - -> Observable { - return Catch(source: self.asObservable(), handler: { _ in Observable.just(element) }) - } - -} - -extension ObservableType { - /** - Continues an observable sequence that is terminated by an error with the next observable sequence. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - public static func catchError(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return CatchSequence(sources: sequence) - } -} - -extension ObservableType { - - /** - Repeats the source observable sequence until it successfully terminates. - - **This could potentially create an infinite sequence.** - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - returns: Observable sequence to repeat until it successfully terminates. - */ - public func retry() -> Observable { - return CatchSequence(sources: InfiniteSequence(repeatedValue: self.asObservable())) - } - - /** - Repeats the source observable sequence the specified number of times in case of an error or until it successfully terminates. - - If you encounter an error and want it to retry once, then you must use `retry(2)` - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter maxAttemptCount: Maximum number of times to repeat the sequence. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. - */ - public func retry(_ maxAttemptCount: Int) - -> Observable { - return CatchSequence(sources: Swift.repeatElement(self.asObservable(), count: maxAttemptCount)) - } -} - -// catch with callback - -final private class CatchSinkProxy: ObserverType { - typealias E = O.E - typealias Parent = CatchSink - - private let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - self._parent.forwardOn(event) - - switch event { - case .next: - break - case .error, .completed: - self._parent.dispose() - } - } -} - -final private class CatchSink: Sink, ObserverType { - typealias E = O.E - typealias Parent = Catch - - private let _parent: Parent - private let _subscription = SerialDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let d1 = SingleAssignmentDisposable() - self._subscription.disposable = d1 - d1.setDisposable(self._parent._source.subscribe(self)) - - return self._subscription - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .completed: - self.forwardOn(event) - self.dispose() - case .error(let error): - do { - let catchSequence = try self._parent._handler(error) - - let observer = CatchSinkProxy(parent: self) - - self._subscription.disposable = catchSequence.subscribe(observer) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } -} - -final private class Catch: Producer { - typealias Handler = (Swift.Error) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _handler: Handler - - init(source: Observable, handler: @escaping Handler) { - self._source = source - self._handler = handler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// catch enumerable - -final private class CatchSequenceSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - typealias Parent = CatchSequence - - private var _lastError: Swift.Error? - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error(let error): - self._lastError = error - self.schedule(.moveNext) - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func done() { - if let lastError = self._lastError { - self.forwardOn(.error(lastError)) - } - else { - self.forwardOn(.completed) - } - - self.dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let onError = observable as? CatchSequence { - return (onError.sources.makeIterator(), nil) - } - else { - return nil - } - } -} - -final private class CatchSequence: Producer where S.Iterator.Element: ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - let sources: S - - init(sources: S) { - self.sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSequenceSink(observer: observer, cancel: cancel) - let subscription = sink.run((self.sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift deleted file mode 100644 index b62fa2929af..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// CombineLatest+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable - where C.Iterator.Element: ObservableType { - return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - Merges the specified observable sequences into one observable sequence whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest(_ collection: C) -> Observable<[E]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { - return CombineLatestCollectionType(sources: collection, resultSelector: { $0 }) - } -} - -final private class CombineLatestCollectionTypeSink - : Sink where C.Iterator.Element: ObservableConvertibleType { - typealias R = O.E - typealias Parent = CombineLatestCollectionType - typealias SourceElement = C.Iterator.Element.E - - let _parent: Parent - - let _lock = RecursiveLock() - - // state - var _numberOfValues = 0 - var _values: [SourceElement?] - var _isDone: [Bool] - var _numberOfDone = 0 - var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._values = [SourceElement?](repeating: nil, count: parent._count) - self._isDone = [Bool](repeating: false, count: parent._count) - self._subscriptions = [SingleAssignmentDisposable]() - self._subscriptions.reserveCapacity(parent._count) - - for _ in 0 ..< parent._count { - self._subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - self._lock.lock(); defer { self._lock.unlock() } // { - switch event { - case .next(let element): - if self._values[atIndex] == nil { - self._numberOfValues += 1 - } - - self._values[atIndex] = element - - if self._numberOfValues < self._parent._count { - let numberOfOthersThatAreDone = self._numberOfDone - (self._isDone[atIndex] ? 1 : 0) - if numberOfOthersThatAreDone == self._parent._count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - let result = try self._parent._resultSelector(self._values.map { $0! }) - self.forwardOn(.next(result)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - if self._isDone[atIndex] { - return - } - - self._isDone[atIndex] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._parent._count { - self.forwardOn(.completed) - self.dispose() - } - else { - self._subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in self._parent._sources { - let index = j - let source = i.asObservable() - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - - self._subscriptions[j].setDisposable(disposable) - - j += 1 - } - - if self._parent._sources.isEmpty { - self.forwardOn(.completed) - } - - return Disposables.create(_subscriptions) - } -} - -final private class CombineLatestCollectionType: Producer where C.Iterator.Element: ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let _sources: C - let _resultSelector: ResultSelector - let _count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - self._sources = sources - self._resultSelector = resultSelector - self._count = Int(Int64(self._sources.count)) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift deleted file mode 100644 index 7474bdc449f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift +++ /dev/null @@ -1,843 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// CombineLatest+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class CombineLatestSink2_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest2 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2) - } -} - -final class CombineLatest2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let _source1: Observable - let _source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class CombineLatestSink3_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest3 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3) - } -} - -final class CombineLatest3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class CombineLatestSink4_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest4 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4) - } -} - -final class CombineLatest4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class CombineLatestSink5_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest5 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5) - } -} - -final class CombineLatest5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class CombineLatestSink6_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest6 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6) - } -} - -final class CombineLatest6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class CombineLatestSink7_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest7 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: self._lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - subscription7.setDisposable(self._parent._source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6, self._latestElement7) - } -} - -final class CombineLatest7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - self._source7 = source7 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - return CombineLatest8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return CombineLatest8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class CombineLatestSink8_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest8 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - var _latestElement8: E8! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: self._lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - let observer8 = CombineLatestObserver(lock: self._lock, parent: self, index: 7, setLatestValue: { (e: E8) -> Void in self._latestElement8 = e }, this: subscription8) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - subscription7.setDisposable(self._parent._source7.subscribe(observer7)) - subscription8.setDisposable(self._parent._source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6, self._latestElement7, self._latestElement8) - } -} - -final class CombineLatest8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - let _source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - self._source7 = source7 - self._source8 = source8 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift deleted file mode 100644 index dbecf98ab36..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// CombineLatest.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol CombineLatestProtocol : class { - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class CombineLatestSink - : Sink - , CombineLatestProtocol { - typealias Element = O.E - - let _lock = RecursiveLock() - - private let _arity: Int - private var _numberOfValues = 0 - private var _numberOfDone = 0 - private var _hasValue: [Bool] - private var _isDone: [Bool] - - init(arity: Int, observer: O, cancel: Cancelable) { - self._arity = arity - self._hasValue = [Bool](repeating: false, count: arity) - self._isDone = [Bool](repeating: false, count: arity) - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func next(_ index: Int) { - if !self._hasValue[index] { - self._hasValue[index] = true - self._numberOfValues += 1 - } - - if self._numberOfValues == self._arity { - do { - let result = try self.getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - else { - var allOthersDone = true - - for i in 0 ..< self._arity { - if i != index && !self._isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - self.forwardOn(.completed) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - self.forwardOn(.error(error)) - self.dispose() - } - - func done(_ index: Int) { - if self._isDone[index] { - return - } - - self._isDone[index] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._arity { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class CombineLatestObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = ElementType - typealias ValueSetter = (Element) -> Void - - private let _parent: CombineLatestProtocol - - let _lock: RecursiveLock - private let _index: Int - private let _this: Disposable - private let _setLatestValue: ValueSetter - - init(lock: RecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { - self._lock = lock - self._parent = parent - self._index = index - self._this = this - self._setLatestValue = setLatestValue - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - self._setLatestValue(value) - self._parent.next(self._index) - case .error(let error): - self._this.dispose() - self._parent.fail(error) - case .completed: - self._this.dispose() - self._parent.done(self._index) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift deleted file mode 100644 index 27daf8d4dc8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// Concat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Concatenates the second observable sequence to `self` upon successful termination of `self`. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - parameter second: Second observable sequence. - - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. - */ - public func concat(_ second: O) -> Observable where O.E == E { - return Observable.concat([self.asObservable(), second.asObservable()]) - } -} - -extension ObservableType { - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: sequence, count: nil) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ collection: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: collection, count: Int64(collection.count)) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ sources: Observable ...) -> Observable { - return Concat(sources: sources, count: Int64(sources.count)) - } -} - -final private class ConcatSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event){ - switch event { - case .next: - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.schedule(.moveNext) - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let source = observable as? Concat { - return (source._sources.makeIterator(), source._count) - } - else { - return nil - } - } -} - -final private class Concat: Producer where S.Iterator.Element: ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _count: IntMax? - - init(sources: S, count: IntMax?) { - self._sources = sources - self._count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ConcatSink(observer: observer, cancel: cancel) - let subscription = sink.run((self._sources.makeIterator(), self._count)) - return (sink: sink, subscription: subscription) - } -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift deleted file mode 100644 index b57a63ab108..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// Create.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - // MARK: create - - /** - Creates an observable sequence from a specified subscribe method implementation. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. - - returns: The observable sequence with the specified implementation for the `subscribe` method. - */ - public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { - return AnonymousObservable(subscribe) - } -} - -final private class AnonymousObservableSink: Sink, ObserverType { - typealias E = O.E - typealias Parent = AnonymousObservable - - // state - private let _isStopped = AtomicInt(0) - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { self._synchronizationTracker.unregister() } - #endif - switch event { - case .next: - if load(self._isStopped) == 1 { - return - } - self.forwardOn(event) - case .error, .completed: - if fetchOr(self._isStopped, 1) == 0 { - self.forwardOn(event) - self.dispose() - } - } - } - - func run(_ parent: Parent) -> Disposable { - return parent._subscribeHandler(AnyObserver(self)) - } -} - -final private class AnonymousObservable: Producer { - typealias SubscribeHandler = (AnyObserver) -> Disposable - - let _subscribeHandler: SubscribeHandler - - init(_ subscribeHandler: @escaping SubscribeHandler) { - self._subscribeHandler = subscribeHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AnonymousObservableSink(observer: observer, cancel: cancel) - let subscription = sink.run(self) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift deleted file mode 100644 index 0b23cc94b7a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift +++ /dev/null @@ -1,118 +0,0 @@ -// -// Debounce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/11/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter scheduler: Scheduler to run the throttle timers on. - - returns: The throttled sequence. - */ - public func debounce(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Debounce(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final private class DebounceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Debounce - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _id = 0 as UInt64 - private var _value: Element? - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._id = self._id &+ 1 - let currentId = self._id - self._value = element - - - let scheduler = self._parent._scheduler - let dueTime = self._parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - d.setDisposable(scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate)) - case .error: - self._value = nil - self.forwardOn(event) - self.dispose() - case .completed: - if let value = self._value { - self._value = nil - self.forwardOn(.next(value)) - } - self.forwardOn(.completed) - self.dispose() - } - } - - func propagate(_ currentId: UInt64) -> Disposable { - self._lock.lock(); defer { self._lock.unlock() } // { - let originalValue = self._value - - if let value = originalValue, self._id == currentId { - self._value = nil - self.forwardOn(.next(value)) - } - // } - return Disposables.create() - } -} - -final private class Debounce: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DebounceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift deleted file mode 100644 index 1a07eb6e454..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// Debug.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import class Foundation.DateFormatter - -extension ObservableType { - - /** - Prints received events for all observers on standard output. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter identifier: Identifier that is printed together with event description to standard output. - - parameter trimOutput: Should output be trimmed to max 40 characters. - - returns: An observable sequence whose events are printed to standard output. - */ - public func debug(_ identifier: String? = nil, trimOutput: Bool = false, file: String = #file, line: UInt = #line, function: String = #function) - -> Observable { - return Debug(source: self, identifier: identifier, trimOutput: trimOutput, file: file, line: line, function: function) - } -} - -fileprivate let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" - -fileprivate func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { - print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") -} - -final private class DebugSink: Sink, ObserverType where O.E == Source.E { - typealias Element = O.E - typealias Parent = Debug - - private let _parent: Parent - private let _timestampFormatter = DateFormatter() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._timestampFormatter.dateFormat = dateFormat - - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "subscribed") - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - let maxEventTextLength = 40 - let eventText = "\(event)" - - let eventNormalized = (eventText.count > maxEventTextLength) && self._parent._trimOutput - ? String(eventText.prefix(maxEventTextLength / 2)) + "..." + String(eventText.suffix(maxEventTextLength / 2)) - : eventText - - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "Event \(eventNormalized)") - - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - - override func dispose() { - if !self.disposed { - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "isDisposed") - } - super.dispose() - } -} - -final private class Debug: Producer { - fileprivate let _identifier: String - fileprivate let _trimOutput: Bool - fileprivate let _source: Source - - init(source: Source, identifier: String?, trimOutput: Bool, file: String, line: UInt, function: String) { - self._trimOutput = trimOutput - if let identifier = identifier { - self._identifier = identifier - } - else { - let trimmedFile: String - if let lastIndex = file.lastIndexOf("/") { - trimmedFile = String(file[file.index(after: lastIndex) ..< file.endIndex]) - } - else { - trimmedFile = file - } - self._identifier = "\(trimmedFile):\(line) (\(function))" - } - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Source.E { - let sink = DebugSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift deleted file mode 100644 index cf0bfed9dc6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// DefaultIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Emits elements from the source observable sequence, or a default element if the source observable sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter default: Default element to be sent if the source does not emit any elements - - returns: An observable sequence which emits default element end completes in case the original sequence is empty - */ - public func ifEmpty(default: E) -> Observable { - return DefaultIfEmpty(source: self.asObservable(), default: `default`) - } -} - -final private class DefaultIfEmptySink: Sink, ObserverType { - typealias E = O.E - private let _default: E - private var _isEmpty = true - - init(default: E, observer: O, cancel: Cancelable) { - self._default = `default` - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self._isEmpty = false - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._isEmpty { - self.forwardOn(.next(self._default)) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class DefaultIfEmpty: Producer { - private let _source: Observable - private let _default: SourceType - - init(source: Observable, `default`: SourceType) { - self._source = source - self._default = `default` - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = DefaultIfEmptySink(default: self._default, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift deleted file mode 100644 index b75fbf9162b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Deferred.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - - - seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html) - - - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. - - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. - */ - public static func deferred(_ observableFactory: @escaping () throws -> Observable) - -> Observable { - return Deferred(observableFactory: observableFactory) - } -} - -final private class DeferredSink: Sink, ObserverType where S.E == O.E { - typealias E = O.E - - private let _observableFactory: () throws -> S - - init(observableFactory: @escaping () throws -> S, observer: O, cancel: Cancelable) { - self._observableFactory = observableFactory - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let result = try self._observableFactory() - return result.subscribe(self) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - self.forwardOn(event) - - switch event { - case .next: - break - case .error: - self.dispose() - case .completed: - self.dispose() - } - } -} - -final private class Deferred: Producer { - typealias Factory = () throws -> S - - private let _observableFactory : Factory - - init(observableFactory: @escaping Factory) { - self._observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = DeferredSink(observableFactory: self._observableFactory, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift deleted file mode 100644 index 61969d5cfe5..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Delay.swift -// RxSwift -// -// Created by tarunon on 2016/02/09. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -extension ObservableType { - - /** - Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the source by. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: the source Observable shifted in time by the specified delay. - */ - public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final private class DelaySink - : Sink - , ObserverType { - typealias E = O.E - typealias Source = Observable - typealias DisposeKey = Bag.KeyType - - private let _lock = RecursiveLock() - - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - private let _sourceSubscription = SingleAssignmentDisposable() - private let _cancelable = SerialDisposable() - - // is scheduled some action - private var _active = false - // is "run loop" on different scheduler running - private var _running = false - private var _errorEvent: Event? - - // state - private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) - private var _disposed = false - - init(observer: O, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { - self._dueTime = dueTime - self._scheduler = scheduler - super.init(observer: observer, cancel: cancel) - } - - // All of these complications in this method are caused by the fact that - // error should be propagated immediately. Error can be potentially received on different - // scheduler so this process needs to be synchronized somehow. - // - // Another complication is that scheduler is potentially concurrent so internal queue is used. - func drainQueue(state: (), scheduler: AnyRecursiveScheduler<()>) { - - self._lock.lock() // { - let hasFailed = self._errorEvent != nil - if !hasFailed { - self._running = true - } - self._lock.unlock() // } - - if hasFailed { - return - } - - var ranAtLeastOnce = false - - while true { - self._lock.lock() // { - let errorEvent = self._errorEvent - - let eventToForwardImmediately = ranAtLeastOnce ? nil : self._queue.dequeue()?.event - let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !self._queue.isEmpty ? self._queue.peek().eventTime : nil - - if errorEvent == nil { - if eventToForwardImmediately != nil { - } - else if nextEventToScheduleOriginalTime != nil { - self._running = false - } - else { - self._running = false - self._active = false - } - } - self._lock.unlock() // { - - if let errorEvent = errorEvent { - self.forwardOn(errorEvent) - self.dispose() - return - } - else { - if let eventToForwardImmediately = eventToForwardImmediately { - ranAtLeastOnce = true - self.forwardOn(eventToForwardImmediately) - if case .completed = eventToForwardImmediately { - self.dispose() - return - } - } - else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { - let elapsedTime = self._scheduler.now.timeIntervalSince(nextEventToScheduleOriginalTime) - let interval = self._dueTime - elapsedTime - let normalizedInterval = interval < 0.0 ? 0.0 : interval - scheduler.schedule((), dueTime: normalizedInterval) - return - } - else { - return - } - } - } - } - - func on(_ event: Event) { - if event.isStopEvent { - self._sourceSubscription.dispose() - } - - switch event { - case .error: - self._lock.lock() // { - let shouldSendImmediately = !self._running - self._queue = Queue(capacity: 0) - self._errorEvent = event - self._lock.unlock() // } - - if shouldSendImmediately { - self.forwardOn(event) - self.dispose() - } - default: - self._lock.lock() // { - let shouldSchedule = !self._active - self._active = true - self._queue.enqueue((self._scheduler.now, event)) - self._lock.unlock() // } - - if shouldSchedule { - self._cancelable.disposable = self._scheduler.scheduleRecursive((), dueTime: self._dueTime, action: self.drainQueue) - } - } - } - - func run(source: Observable) -> Disposable { - self._sourceSubscription.setDisposable(source.subscribe(self)) - return Disposables.create(_sourceSubscription, _cancelable) - } -} - -final private class Delay: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySink(observer: observer, dueTime: self._dueTime, scheduler: self._scheduler, cancel: cancel) - let subscription = sink.run(source: self._source) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift deleted file mode 100644 index 16218a701f3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// DelaySubscription.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the subscription. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: Time-shifted sequence. - */ - public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final private class DelaySubscriptionSink - : Sink, ObserverType { - typealias E = O.E - - func on(_ event: Event) { - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - -} - -final private class DelaySubscription: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySubscriptionSink(observer: observer, cancel: cancel) - let subscription = self._scheduler.scheduleRelative((), dueTime: self._dueTime) { _ in - return self._source.subscribe(sink) - } - - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift deleted file mode 100644 index e315d17103e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Dematerialize.swift -// RxSwift -// -// Created by Jamie Pinkham on 3/13/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E: EventConvertible { - /** - Convert any previously materialized Observable into it's original form. - - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) - - returns: The dematerialized observable sequence. - */ - public func dematerialize() -> Observable { - return Dematerialize(source: self.asObservable()) - } - -} - -fileprivate final class DematerializeSink: Sink, ObserverType where O.E == Element.ElementType { - fileprivate func on(_ event: Event) { - switch event { - case .next(let element): - self.forwardOn(element.event) - if element.event.isStopEvent { - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Dematerialize: Producer { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { - let sink = DematerializeSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift deleted file mode 100644 index db0b0ab9218..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// DistinctUntilChanged.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E: Equatable { - - /** - Returns an observable sequence that contains only distinct contiguous elements according to equality operator. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. - */ - public func distinctUntilChanged() - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) - } -} - -extension ObservableType { - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K) - -> Observable { - return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence. - */ - public func distinctUntilChanged(_ comparer: @escaping (E, E) throws -> Bool) - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: comparer) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) - -> Observable { - return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) - } -} - -final private class DistinctUntilChangedSink: Sink, ObserverType { - typealias E = O.E - - private let _parent: DistinctUntilChanged - private var _currentKey: Key? - - init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let key = try self._parent._selector(value) - var areEqual = false - if let currentKey = self._currentKey { - areEqual = try self._parent._comparer(currentKey, key) - } - - if areEqual { - return - } - - self._currentKey = key - - self.forwardOn(event) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class DistinctUntilChanged: Producer { - typealias KeySelector = (Element) throws -> Key - typealias EqualityComparer = (Key, Key) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - fileprivate let _comparer: EqualityComparer - - init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { - self._source = source - self._selector = selector - self._comparer = comparer - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift deleted file mode 100644 index d0571319418..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// Do.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. - - parameter onSubscribed: Action to invoke after subscribing to source observable sequence. - - parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed. - - returns: The source sequence with the side-effecting behavior applied. - */ - public func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> Void)? = nil, onSubscribed: (() -> Void)? = nil, onDispose: (() -> Void)? = nil) - -> Observable { - return Do(source: self.asObservable(), eventHandler: { e in - switch e { - case .next(let element): - try onNext?(element) - case .error(let e): - try onError?(e) - case .completed: - try onCompleted?() - } - }, onSubscribe: onSubscribe, onSubscribed: onSubscribed, onDispose: onDispose) - } -} - -final private class DoSink: Sink, ObserverType { - typealias Element = O.E - typealias EventHandler = (Event) throws -> Void - - private let _eventHandler: EventHandler - - init(eventHandler: @escaping EventHandler, observer: O, cancel: Cancelable) { - self._eventHandler = eventHandler - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - do { - try self._eventHandler(event) - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Do: Producer { - typealias EventHandler = (Event) throws -> Void - - fileprivate let _source: Observable - fileprivate let _eventHandler: EventHandler - fileprivate let _onSubscribe: (() -> Void)? - fileprivate let _onSubscribed: (() -> Void)? - fileprivate let _onDispose: (() -> Void)? - - init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> Void)?, onSubscribed: (() -> Void)?, onDispose: (() -> Void)?) { - self._source = source - self._eventHandler = eventHandler - self._onSubscribe = onSubscribe - self._onSubscribed = onSubscribed - self._onDispose = onDispose - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - self._onSubscribe?() - let sink = DoSink(eventHandler: self._eventHandler, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - self._onSubscribed?() - let onDispose = self._onDispose - let allSubscriptions = Disposables.create { - subscription.dispose() - onDispose?() - } - return (sink: sink, subscription: allSubscriptions) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift deleted file mode 100644 index 2279400229d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// ElementAt.swift -// RxSwift -// -// Created by Junior B. on 21/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a sequence emitting only element _n_ emitted by an Observable - - - seealso: [elementAt operator on reactivex.io](http://reactivex.io/documentation/operators/elementat.html) - - - parameter index: The index of the required element (starting from 0). - - returns: An observable sequence that emits the desired element as its own sole emission. - */ - public func elementAt(_ index: Int) - -> Observable { - return ElementAt(source: self.asObservable(), index: index, throwOnEmpty: true) - } -} - -final private class ElementAtSink: Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = ElementAt - - let _parent: Parent - var _i: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._i = parent._index - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - - if self._i == 0 { - self.forwardOn(event) - self.forwardOn(.completed) - self.dispose() - } - - do { - _ = try decrementChecked(&self._i) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - if self._parent._throwOnEmpty { - self.forwardOn(.error(RxError.argumentOutOfRange)) - } else { - self.forwardOn(.completed) - } - - self.dispose() - } - } -} - -final private class ElementAt: Producer { - let _source: Observable - let _throwOnEmpty: Bool - let _index: Int - - init(source: Observable, index: Int, throwOnEmpty: Bool) { - if index < 0 { - rxFatalError("index can't be negative") - } - - self._source = source - self._index = index - self._throwOnEmpty = throwOnEmpty - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Empty.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Empty.swift deleted file mode 100644 index cf72519126a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Empty.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Empty.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. - - - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence with no elements. - */ - public static func empty() -> Observable { - return EmptyProducer() - } -} - -final private class EmptyProducer: Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.completed) - return Disposables.create() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift deleted file mode 100644 index fdf326ec623..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Enumerated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/6/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Enumerates the elements of an observable sequence. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - returns: An observable sequence that contains tuples of source sequence elements and their indexes. - */ - public func enumerated() - -> Observable<(index: Int, element: E)> { - return Enumerated(source: self.asObservable()) - } -} - -final private class EnumeratedSink: Sink, ObserverType where O.E == (index: Int, element: Element) { - typealias E = Element - var index = 0 - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let nextIndex = try incrementChecked(&self.index) - let next = (index: nextIndex, element: value) - self.forwardOn(.next(next)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Enumerated: Producer<(index: Int, element: Element)> { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == (index: Int, element: Element) { - let sink = EnumeratedSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift deleted file mode 100644 index 026a7cee009..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Error.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that terminates with an `error`. - - - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: The observable sequence that terminates with specified error. - */ - public static func error(_ error: Swift.Error) -> Observable { - return ErrorProducer(error: error) - } -} - -final private class ErrorProducer: Producer { - private let _error: Swift.Error - - init(error: Swift.Error) { - self._error = error - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.error(self._error)) - return Disposables.create() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift deleted file mode 100644 index d77e89022d8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Filter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Filters the elements of an observable sequence based on a predicate. - - - seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that contains elements from the input sequence that satisfy the condition. - */ - public func filter(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return Filter(source: self.asObservable(), predicate: predicate) - } -} - -extension ObservableType { - - /** - Skips elements and completes (or errors) when the observable sequence completes (or errors). Equivalent to filter that always returns false. - - - seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html) - - - returns: An observable sequence that skips all elements of the source sequence. - */ - public func ignoreElements() - -> Completable { - return self.flatMap { _ in - return Observable.empty() - } - .asCompletable() - } -} - -final private class FilterSink: Sink, ObserverType { - typealias Predicate = (Element) throws -> Bool - typealias Element = O.E - - private let _predicate: Predicate - - init(predicate: @escaping Predicate, observer: O, cancel: Cancelable) { - self._predicate = predicate - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let satisfies = try self._predicate(value) - if satisfies { - self.forwardOn(.next(value)) - } - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed, .error: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class Filter: Producer { - typealias Predicate = (Element) throws -> Bool - - private let _source: Observable - private let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = FilterSink(predicate: self._predicate, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift deleted file mode 100644 index 29ba8dedc4f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// First.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/31/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class FirstSink : Sink, ObserverType where O.E == Element? { - typealias E = Element - typealias Parent = First - - func on(_ event: Event) { - switch event { - case .next(let value): - self.forwardOn(.next(value)) - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.next(nil)) - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class First: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element? { - let sink = FirstSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift deleted file mode 100644 index 98635e9748a..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Generate.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler - to run the loop send out observer messages. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter initialState: Initial state. - - parameter condition: Condition to terminate generation (upon returning `false`). - - parameter iterate: Iteration step function. - - parameter scheduler: Scheduler on which to run the generator loop. - - returns: The generated sequence. - */ - public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { - return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) - } -} - -final private class GenerateSink: Sink { - typealias Parent = Generate - - private let _parent: Parent - - private var _state: S - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._state = parent._initialState - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(true) { isFirst, recurse -> Void in - do { - if !isFirst { - self._state = try self._parent._iterate(self._state) - } - - if try self._parent._condition(self._state) { - let result = try self._parent._resultSelector(self._state) - self.forwardOn(.next(result)) - - recurse(false) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } - } -} - -final private class Generate: Producer { - fileprivate let _initialState: S - fileprivate let _condition: (S) throws -> Bool - fileprivate let _iterate: (S) throws -> S - fileprivate let _resultSelector: (S) throws -> E - fileprivate let _scheduler: ImmediateSchedulerType - - init(initialState: S, condition: @escaping (S) throws -> Bool, iterate: @escaping (S) throws -> S, resultSelector: @escaping (S) throws -> E, scheduler: ImmediateSchedulerType) { - self._initialState = initialState - self._condition = condition - self._iterate = iterate - self._resultSelector = resultSelector - self._scheduler = scheduler - super.init() - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift deleted file mode 100644 index adce8763a97..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift +++ /dev/null @@ -1,134 +0,0 @@ -// -// GroupBy.swift -// RxSwift -// -// Created by Tomi Koskinen on 01/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /* - Groups the elements of an observable sequence according to a specified key selector function. - - - seealso: [groupBy operator on reactivex.io](http://reactivex.io/documentation/operators/groupby.html) - - - parameter keySelector: A function to extract the key for each element. - - returns: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. - */ - public func groupBy(keySelector: @escaping (E) throws -> K) - -> Observable> { - return GroupBy(source: self.asObservable(), selector: keySelector) - } -} - -final private class GroupedObservableImpl: Observable { - private var _subject: PublishSubject - private var _refCount: RefCountDisposable - - init(subject: PublishSubject, refCount: RefCountDisposable) { - self._subject = subject - self._refCount = refCount - } - - override public func subscribe(_ observer: O) -> Disposable where O.E == E { - let release = self._refCount.retain() - let subscription = self._subject.subscribe(observer) - return Disposables.create(release, subscription) - } -} - - -final private class GroupBySink - : Sink - , ObserverType where O.E == GroupedObservable { - typealias E = Element - typealias ResultType = O.E - typealias Parent = GroupBy - - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - private var _refCountDisposable: RefCountDisposable! - private var _groupedSubjectTable: [Key: PublishSubject] - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._groupedSubjectTable = [Key: PublishSubject]() - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self._refCountDisposable = RefCountDisposable(disposable: self._subscription) - - self._subscription.setDisposable(self._parent._source.subscribe(self)) - - return self._refCountDisposable - } - - private func onGroupEvent(key: Key, value: Element) { - if let writer = self._groupedSubjectTable[key] { - writer.on(.next(value)) - } else { - let writer = PublishSubject() - self._groupedSubjectTable[key] = writer - - let group = GroupedObservable( - key: key, - source: GroupedObservableImpl(subject: writer, refCount: _refCountDisposable) - ) - - self.forwardOn(.next(group)) - writer.on(.next(value)) - } - } - - final func on(_ event: Event) { - switch event { - case let .next(value): - do { - let groupKey = try self._parent._selector(value) - self.onGroupEvent(key: groupKey, value: value) - } - catch let e { - self.error(e) - return - } - case let .error(e): - self.error(e) - case .completed: - self.forwardOnGroups(event: .completed) - self.forwardOn(.completed) - self._subscription.dispose() - self.dispose() - } - } - - final func error(_ error: Swift.Error) { - self.forwardOnGroups(event: .error(error)) - self.forwardOn(.error(error)) - self._subscription.dispose() - self.dispose() - } - - final func forwardOnGroups(event: Event) { - for writer in self._groupedSubjectTable.values { - writer.on(event) - } - } -} - -final private class GroupBy: Producer> { - typealias KeySelector = (Element) throws -> Key - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - - init(source: Observable, selector: @escaping KeySelector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { - let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) - return (sink: sink, subscription: sink.run()) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift deleted file mode 100644 index f4fa0d2d5d3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Just.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E) -> Observable { - return Just(element: element) - } - - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the single element on. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E, scheduler: ImmediateSchedulerType) -> Observable { - return JustScheduled(element: element, scheduler: scheduler) - } -} - -final private class JustScheduledSink: Sink { - typealias Parent = JustScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let scheduler = self._parent._scheduler - return scheduler.schedule(self._parent._element) { element in - self.forwardOn(.next(element)) - return scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final private class JustScheduled: Producer { - fileprivate let _scheduler: ImmediateSchedulerType - fileprivate let _element: Element - - init(element: Element, scheduler: ImmediateSchedulerType) { - self._scheduler = scheduler - self._element = element - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class Just: Producer { - private let _element: Element - - init(element: Element) { - self._element = element - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.next(self._element)) - observer.on(.completed) - return Disposables.create() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift deleted file mode 100644 index b5ae3709241..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// Map.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a new form. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter transform: A transform function to apply to each source element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. - - */ - public func map(_ transform: @escaping (E) throws -> R) - -> Observable { - return self.asObservable().composeMap(transform) - } -} - -final private class MapSink: Sink, ObserverType { - typealias Transform = (SourceType) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - - private let _transform: Transform - - init(transform: @escaping Transform, observer: O, cancel: Cancelable) { - self._transform = transform - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try self._transform(element) - self.forwardOn(.next(mappedElement)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } -} - -#if TRACE_RESOURCES - fileprivate let _numberOfMapOperators = AtomicInt(0) - extension Resources { - public static var numberOfMapOperators: Int32 { - return load(_numberOfMapOperators) - } - } -#endif - -internal func _map(source: Observable, transform: @escaping (Element) throws -> R) -> Observable { - return Map(source: source, transform: transform) -} - -final private class Map: Producer { - typealias Transform = (SourceType) throws -> ResultType - - private let _source: Observable - - private let _transform: Transform - - init(source: Observable, transform: @escaping Transform) { - self._source = source - self._transform = transform - -#if TRACE_RESOURCES - _ = increment(_numberOfMapOperators) -#endif - } - - override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { - let originalSelector = self._transform - return Map(source: self._source, transform: { (s: SourceType) throws -> R in - let r: ResultType = try originalSelector(s) - return try selector(r) - }) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapSink(transform: self._transform, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - _ = decrement(_numberOfMapOperators) - } - #endif -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift deleted file mode 100644 index 1a5e2f52bff..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Materialize.swift -// RxSwift -// -// Created by sergdort on 08/03/2017. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Convert any Observable into an Observable of its events. - - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) - - returns: An observable sequence that wraps events in an Event. The returned Observable never errors, but it does complete after observing all of the events of the underlying Observable. - */ - public func materialize() -> Observable> { - return Materialize(source: self.asObservable()) - } -} - -fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { - - func on(_ event: Event) { - self.forwardOn(.next(event)) - if event.isStopEvent { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class Materialize: Producer> { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MaterializeSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift deleted file mode 100644 index 0bc0a383471..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift +++ /dev/null @@ -1,598 +0,0 @@ -// -// Merge.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - public func flatMap(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMap(source: self.asObservable(), selector: selector) - } - -} - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - If element is received while there is some projected observable sequence being merged it will simply be ignored. - - - seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated. - */ - public func flatMapFirst(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapFirst(source: self.asObservable(), selector: selector) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public func merge() -> Observable { - return Merge(source: self.asObservable()) - } - - /** - Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - - returns: The observable sequence that merges the elements of the inner sequences. - */ - public func merge(maxConcurrent: Int) - -> Observable { - return MergeLimited(source: self.asObservable(), maxConcurrent: maxConcurrent) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - public func concat() -> Observable { - return self.merge(maxConcurrent: 1) - } -} - -extension ObservableType { - /** - Merges elements from all observable sequences from collection into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: C) -> Observable where C.Iterator.Element == Observable { - return MergeArray(sources: Array(sources)) - } - - /** - Merges elements from all observable sequences from array into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Array of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: [Observable]) -> Observable { - return MergeArray(sources: sources) - } - - /** - Merges elements from all observable sequences into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: Observable...) -> Observable { - return MergeArray(sources: sources) - } -} - -// MARK: concatMap - -extension ObservableType { - /** - Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences into one observable sequence. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - - public func concatMap(_ selector: @escaping (E) throws -> O) - -> Observable { - return ConcatMap(source: self.asObservable(), selector: selector) - } -} - -fileprivate final class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where SourceSequence.E == Observer.E { - typealias E = Observer.E - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias Parent = MergeLimitedSink - - private let _parent: Parent - private let _disposeKey: DisposeKey - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, disposeKey: DisposeKey) { - self._parent = parent - self._disposeKey = disposeKey - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent._group.remove(for: self._disposeKey) - if let next = self._parent._queue.dequeue() { - self._parent.subscribe(next, group: self._parent._group) - } - else { - self._parent._activeCount -= 1 - - if self._parent._stopped && self._parent._activeCount == 0 { - self._parent.forwardOn(.completed) - self._parent.dispose() - } - } - } - } -} - -fileprivate final class ConcatMapSink: MergeLimitedSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(maxConcurrent: 1, observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -fileprivate final class MergeLimitedBasicSink: MergeLimitedSink where Observer.E == SourceSequence.E { - - override func performMap(_ element: SourceSequence) throws -> SourceSequence { - return element - } -} - -private class MergeLimitedSink - : Sink - , ObserverType where Observer.E == SourceSequence.E { - typealias QueueType = Queue - - let _maxConcurrent: Int - - let _lock = RecursiveLock() - - // state - var _stopped = false - var _activeCount = 0 - var _queue = QueueType(capacity: 2) - - let _sourceSubscription = SingleAssignmentDisposable() - let _group = CompositeDisposable() - - init(maxConcurrent: Int, observer: Observer, cancel: Cancelable) { - self._maxConcurrent = maxConcurrent - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - _ = self._group.insert(self._sourceSubscription) - - let disposable = source.subscribe(self) - self._sourceSubscription.setDisposable(disposable) - return self._group - } - - func subscribe(_ innerSource: SourceSequence, group: CompositeDisposable) { - let subscription = SingleAssignmentDisposable() - - let key = group.insert(subscription) - - if let key = key { - let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) - - let disposable = innerSource.asObservable().subscribe(observer) - subscription.setDisposable(disposable) - } - } - - func performMap(_ element: SourceElement) throws -> SourceSequence { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: SourceElement) -> SourceSequence? { - self._lock.lock(); defer { self._lock.unlock() } // { - let subscribe: Bool - if self._activeCount < self._maxConcurrent { - self._activeCount += 1 - subscribe = true - } - else { - do { - let value = try self.performMap(element) - self._queue.enqueue(value) - } catch { - self.forwardOn(.error(error)) - self.dispose() - } - subscribe = false - } - - if subscribe { - do { - return try self.performMap(element) - } catch { - self.forwardOn(.error(error)) - self.dispose() - } - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let sequence = self.nextElementArrived(element: element) { - self.subscribe(sequence, group: self._group) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - - if self._activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - else { - self._sourceSubscription.dispose() - } - - self._stopped = true - } - } -} - -final private class MergeLimited: Producer { - private let _source: Observable - private let _maxConcurrent: Int - - init(source: Observable, maxConcurrent: Int) { - self._source = source - self._maxConcurrent = maxConcurrent - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = MergeLimitedBasicSink(maxConcurrent: self._maxConcurrent, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -// MARK: Merge - -fileprivate final class MergeBasicSink : MergeSink where O.E == S.E { - override func performMap(_ element: S) throws -> S { - return element - } -} - -// MARK: flatMap - -fileprivate final class FlatMapSink : MergeSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -// MARK: FlatMapFirst - -fileprivate final class FlatMapFirstSink : MergeSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - override var subscribeNext: Bool { - return self._activeCount == 0 - } - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -fileprivate final class MergeSinkIter : ObserverType where Observer.E == SourceSequence.E { - typealias Parent = MergeSink - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias E = Observer.E - - private let _parent: Parent - private let _disposeKey: DisposeKey - - init(parent: Parent, disposeKey: DisposeKey) { - self._parent = parent - self._disposeKey = disposeKey - } - - func on(_ event: Event) { - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // lock { - switch event { - case .next(let value): - self._parent.forwardOn(.next(value)) - case .error(let error): - self._parent.forwardOn(.error(error)) - self._parent.dispose() - case .completed: - self._parent._group.remove(for: self._disposeKey) - self._parent._activeCount -= 1 - self._parent.checkCompleted() - } - // } - } -} - - -private class MergeSink - : Sink - , ObserverType where Observer.E == SourceSequence.E { - typealias ResultType = Observer.E - typealias Element = SourceElement - - let _lock = RecursiveLock() - - var subscribeNext: Bool { - return true - } - - // state - let _group = CompositeDisposable() - let _sourceSubscription = SingleAssignmentDisposable() - - var _activeCount = 0 - var _stopped = false - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func performMap(_ element: SourceElement) throws -> SourceSequence { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: SourceElement) -> SourceSequence? { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self.subscribeNext { - return nil - } - - do { - let value = try self.performMap(element) - self._activeCount += 1 - return value - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return nil - } - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let value = self.nextElementArrived(element: element) { - self.subscribeInner(value.asObservable()) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - self._stopped = true - self._sourceSubscription.dispose() - self.checkCompleted() - } - } - - func subscribeInner(_ source: Observable) { - let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = self._group.insert(iterDisposable) { - let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) - let subscription = source.subscribe(iter) - iterDisposable.setDisposable(subscription) - } - } - - func run(_ sources: [Observable]) -> Disposable { - self._activeCount += sources.count - - for source in sources { - self.subscribeInner(source) - } - - self._stopped = true - - self.checkCompleted() - - return self._group - } - - @inline(__always) - func checkCompleted() { - if self._stopped && self._activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - - func run(_ source: Observable) -> Disposable { - _ = self._group.insert(self._sourceSubscription) - - let subscription = source.subscribe(self) - self._sourceSubscription.setDisposable(subscription) - - return self._group - } -} - -// MARK: Producers - -final private class FlatMap: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = FlatMapSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class FlatMapFirst: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = FlatMapFirstSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final class ConcatMap: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = ConcatMapSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final class Merge : Producer { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = MergeBasicSink(observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class MergeArray: Producer { - private let _sources: [Observable] - - init(sources: [Observable]) { - self._sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MergeBasicSink, O>(observer: observer, cancel: cancel) - let subscription = sink.run(self._sources) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift deleted file mode 100644 index 7e47389f725..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift +++ /dev/null @@ -1,408 +0,0 @@ -// -// Multicast.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** - Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence. - */ -public class ConnectableObservable - : Observable - , ConnectableObservableType { - - /** - Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. - - - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - */ - public func connect() -> Disposable { - rxAbstractMethod() - } -} - -extension ObservableType { - - /** - Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. - - Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. - - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) - -> Observable where S.SubjectObserverType.E == E { - return Multicast( - source: self.asObservable(), - subjectSelector: subjectSelector, - selector: selector - ) - } -} - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of `multicast` using a `PublishSubject`. - - - seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func publish() -> ConnectableObservable { - return self.multicast { PublishSubject() } - } -} - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func replay(_ bufferSize: Int) - -> ConnectableObservable { - return self.multicast { ReplaySubject.create(bufferSize: bufferSize) } - } - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func replayAll() - -> ConnectableObservable { - return self.multicast { ReplaySubject.createUnbounded() } - } -} - -extension ConnectableObservableType { - - /** - Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - - - seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html) - - - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - */ - public func refCount() -> Observable { - return RefCount(source: self) - } -} - -extension ObservableType { - - /** - Multicasts the source sequence notifications through the specified subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subject: Subject to push source elements into. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - public func multicast(_ subject: S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: { subject }) - } - - /** - Multicasts the source sequence notifications through an instantiated subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - Subject is cleared on connection disposal or in case source sequence produces terminal event. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter makeSubject: Factory function used to instantiate a subject for each connection. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - public func multicast(makeSubject: @escaping () -> S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: makeSubject) - } -} - -final private class Connection: ObserverType, Disposable { - typealias E = S.SubjectObserverType.E - - private var _lock: RecursiveLock - // state - private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? - private var _subjectObserver: S.SubjectObserverType - - private let _disposed = AtomicInt(0) - - init(parent: ConnectableObservableAdapter, subjectObserver: S.SubjectObserverType, lock: RecursiveLock, subscription: Disposable) { - self._parent = parent - self._subscription = subscription - self._lock = lock - self._subjectObserver = subjectObserver - } - - func on(_ event: Event) { - if isFlagSet(self._disposed, 1) { - return - } - if event.isStopEvent { - self.dispose() - } - self._subjectObserver.on(event) - } - - func dispose() { - _lock.lock(); defer { _lock.unlock() } // { - fetchOr(self._disposed, 1) - guard let parent = _parent else { - return - } - - if parent._connection === self { - parent._connection = nil - parent._subject = nil - } - self._parent = nil - - self._subscription?.dispose() - self._subscription = nil - // } - } -} - -final private class ConnectableObservableAdapter - : ConnectableObservable { - typealias ConnectionType = Connection - - fileprivate let _source: Observable - fileprivate let _makeSubject: () -> S - - fileprivate let _lock = RecursiveLock() - fileprivate var _subject: S? - - // state - fileprivate var _connection: ConnectionType? - - init(source: Observable, makeSubject: @escaping () -> S) { - self._source = source - self._makeSubject = makeSubject - self._subject = nil - self._connection = nil - } - - override func connect() -> Disposable { - return self._lock.calculateLocked { - if let connection = self._connection { - return connection - } - - let singleAssignmentDisposable = SingleAssignmentDisposable() - let connection = Connection(parent: self, subjectObserver: self.lazySubject.asObserver(), lock: self._lock, subscription: singleAssignmentDisposable) - self._connection = connection - let subscription = self._source.subscribe(connection) - singleAssignmentDisposable.setDisposable(subscription) - return connection - } - } - - fileprivate var lazySubject: S { - if let subject = self._subject { - return subject - } - - let subject = self._makeSubject() - self._subject = subject - return subject - } - - override func subscribe(_ observer: O) -> Disposable where O.E == S.E { - return self.lazySubject.subscribe(observer) - } -} - -final private class RefCountSink - : Sink - , ObserverType where CO.E == O.E { - typealias Element = O.E - typealias Parent = RefCount - - private let _parent: Parent - - private var _connectionIdSnapshot: Int64 = -1 - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - - self._connectionIdSnapshot = self._parent._connectionId - - if self.disposed { - return Disposables.create() - } - - if self._parent._count == 0 { - self._parent._count = 1 - self._parent._connectableSubscription = self._parent._source.connect() - } - else { - self._parent._count += 1 - } - // } - - return Disposables.create { - subscription.dispose() - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - if self._parent._connectionId != self._connectionIdSnapshot { - return - } - if self._parent._count == 1 { - self._parent._count = 0 - guard let connectableSubscription = self._parent._connectableSubscription else { - return - } - - connectableSubscription.dispose() - self._parent._connectableSubscription = nil - } - else if self._parent._count > 1 { - self._parent._count -= 1 - } - else { - rxFatalError("Something went wrong with RefCount disposing mechanism") - } - // } - } - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error, .completed: - self._parent._lock.lock() // { - if self._parent._connectionId == self._connectionIdSnapshot { - let connection = self._parent._connectableSubscription - defer { connection?.dispose() } - self._parent._count = 0 - self._parent._connectionId = self._parent._connectionId &+ 1 - self._parent._connectableSubscription = nil - } - // } - self._parent._lock.unlock() - self.forwardOn(event) - self.dispose() - } - } -} - -final private class RefCount: Producer { - fileprivate let _lock = RecursiveLock() - - // state - fileprivate var _count = 0 - fileprivate var _connectionId: Int64 = 0 - fileprivate var _connectableSubscription = nil as Disposable? - - fileprivate let _source: CO - - init(source: CO) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { - let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class MulticastSink: Sink, ObserverType { - typealias Element = O.E - typealias ResultType = Element - typealias MutlicastType = Multicast - - private let _parent: MutlicastType - - init(parent: MutlicastType, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let subject = try self._parent._subjectSelector() - let connectable = ConnectableObservableAdapter(source: self._parent._source, makeSubject: { subject }) - - let observable = try self._parent._selector(connectable) - - let subscription = observable.subscribe(self) - let connection = connectable.connect() - - return Disposables.create(subscription, connection) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - self.forwardOn(event) - switch event { - case .next: break - case .error, .completed: - self.dispose() - } - } -} - -final private class Multicast: Producer { - typealias SubjectSelectorType = () throws -> S - typealias SelectorType = (Observable) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _subjectSelector: SubjectSelectorType - fileprivate let _selector: SelectorType - - init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { - self._source = source - self._subjectSelector = subjectSelector - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Never.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Never.swift deleted file mode 100644 index 51aa3f05049..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Never.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Never.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a non-terminating observable sequence, which can be used to denote an infinite duration. - - - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence whose observers will never get called. - */ - public static func never() -> Observable { - return NeverProducer() - } -} - -final private class NeverProducer: Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - return Disposables.create() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift deleted file mode 100644 index cf7e0b6b811..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift +++ /dev/null @@ -1,231 +0,0 @@ -// -// ObserveOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - - This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription - actions have side-effects that require to be run on a scheduler, use `subscribeOn`. - - - seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html) - - - parameter scheduler: Scheduler to notify observers on. - - returns: The source sequence whose observations happen on the specified scheduler. - */ - public func observeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - if let scheduler = scheduler as? SerialDispatchQueueScheduler { - return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) - } - else { - return ObserveOn(source: self.asObservable(), scheduler: scheduler) - } - } -} - -final private class ObserveOn: Producer { - let scheduler: ImmediateSchedulerType - let source: Observable - - init(source: Observable, scheduler: ImmediateSchedulerType) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSink(scheduler: self.scheduler, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} - -enum ObserveOnState : Int32 { - // pump is not running - case stopped = 0 - // pump is running - case running = 1 -} - -final private class ObserveOnSink: ObserverBase { - typealias E = O.E - - let _scheduler: ImmediateSchedulerType - - var _lock = SpinLock() - let _observer: O - - // state - var _state = ObserveOnState.stopped - var _queue = Queue>(capacity: 10) - - let _scheduleDisposable = SerialDisposable() - let _cancel: Cancelable - - init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { - self._scheduler = scheduler - self._observer = observer - self._cancel = cancel - } - - override func onCore(_ event: Event) { - let shouldStart = self._lock.calculateLocked { () -> Bool in - self._queue.enqueue(event) - - switch self._state { - case .stopped: - self._state = .running - return true - case .running: - return false - } - } - - if shouldStart { - self._scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) - } - } - - func run(_ state: (), _ recurse: (()) -> Void) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in - if !self._queue.isEmpty { - return (self._queue.dequeue(), self._observer) - } - else { - self._state = .stopped - return (nil, self._observer) - } - } - - if let nextEvent = nextEvent, !self._cancel.isDisposed { - observer.on(nextEvent) - if nextEvent.isStopEvent { - self.dispose() - } - } - else { - return - } - - let shouldContinue = self._shouldContinue_synchronized() - - if shouldContinue { - recurse(()) - } - } - - func _shouldContinue_synchronized() -> Bool { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self._queue.isEmpty { - return true - } - else { - self._state = .stopped - return false - } - // } - } - - override func dispose() { - super.dispose() - - self._cancel.dispose() - self._scheduleDisposable.dispose() - } -} - -#if TRACE_RESOURCES - fileprivate let _numberOfSerialDispatchQueueObservables = AtomicInt(0) - extension Resources { - /** - Counts number of `SerialDispatchQueueObservables`. - - Purposed for unit tests. - */ - public static var numberOfSerialDispatchQueueObservables: Int32 { - return load(_numberOfSerialDispatchQueueObservables) - } - } -#endif - -final private class ObserveOnSerialDispatchQueueSink: ObserverBase { - let scheduler: SerialDispatchQueueScheduler - let observer: O - - let cancel: Cancelable - - var cachedScheduleLambda: (((sink: ObserveOnSerialDispatchQueueSink, event: Event)) -> Disposable)! - - init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { - self.scheduler = scheduler - self.observer = observer - self.cancel = cancel - super.init() - - self.cachedScheduleLambda = { pair in - guard !cancel.isDisposed else { return Disposables.create() } - - pair.sink.observer.on(pair.event) - - if pair.event.isStopEvent { - pair.sink.dispose() - } - - return Disposables.create() - } - } - - override func onCore(_ event: Event) { - _ = self.scheduler.schedule((self, event), action: self.cachedScheduleLambda!) - } - - override func dispose() { - super.dispose() - - self.cancel.dispose() - } -} - -final private class ObserveOnSerialDispatchQueue: Producer { - let scheduler: SerialDispatchQueueScheduler - let source: Observable - - init(source: Observable, scheduler: SerialDispatchQueueScheduler) { - self.scheduler = scheduler - self.source = source - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - _ = increment(_numberOfSerialDispatchQueueObservables) - #endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: self.scheduler, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - _ = decrement(_numberOfSerialDispatchQueueObservables) - } - #endif -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift deleted file mode 100644 index 43fede5aec7..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// Optional.swift -// RxSwift -// -// Created by tarunon on 2016/12/13. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?) -> Observable { - return ObservableOptional(optional: optional) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) - } -} - -final private class ObservableOptionalScheduledSink: Sink { - typealias E = O.E - typealias Parent = ObservableOptionalScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.schedule(self._parent._optional) { (optional: E?) -> Disposable in - if let next = optional { - self.forwardOn(.next(next)) - return self._parent._scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } else { - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final private class ObservableOptionalScheduled: Producer { - fileprivate let _optional: E? - fileprivate let _scheduler: ImmediateSchedulerType - - init(optional: E?, scheduler: ImmediateSchedulerType) { - self._optional = optional - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class ObservableOptional: Producer { - private let _optional: E? - - init(optional: E?) { - self._optional = optional - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = self._optional { - observer.on(.next(element)) - } - observer.on(.completed) - return Disposables.create() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift deleted file mode 100644 index f687d1145fd..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// Producer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Producer : Observable { - override init() { - super.init() - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - if !CurrentThreadScheduler.isScheduleRequired { - // The returned disposable needs to release all references once it was disposed. - let disposer = SinkDisposer() - let sinkAndSubscription = self.run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - else { - return CurrentThreadScheduler.instance.schedule(()) { _ in - let disposer = SinkDisposer() - let sinkAndSubscription = self.run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - } - } - - func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - rxAbstractMethod() - } -} - -fileprivate final class SinkDisposer: Cancelable { - fileprivate enum DisposeState: Int32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - private let _state = AtomicInt(0) - private var _sink: Disposable? - private var _subscription: Disposable? - - var isDisposed: Bool { - return isFlagSet(self._state, DisposeState.disposed.rawValue) - } - - func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { - self._sink = sink - self._subscription = subscription - - let previousState = fetchOr(self._state, DisposeState.sinkAndSubscriptionSet.rawValue) - if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { - rxFatalError("Sink and subscription were already set") - } - - if (previousState & DisposeState.disposed.rawValue) != 0 { - sink.dispose() - subscription.dispose() - self._sink = nil - self._subscription = nil - } - } - - func dispose() { - let previousState = fetchOr(self._state, DisposeState.disposed.rawValue) - - if (previousState & DisposeState.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { - guard let sink = self._sink else { - rxFatalError("Sink not set") - } - guard let subscription = self._subscription else { - rxFatalError("Subscription not set") - } - - sink.dispose() - subscription.dispose() - - self._sink = nil - self._subscription = nil - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift deleted file mode 100644 index 67a441204b0..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Range.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E : RxAbstractInteger { - /** - Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. - - - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) - - - parameter start: The value of the first integer in the sequence. - - parameter count: The number of sequential integers to generate. - - parameter scheduler: Scheduler to run the generator loop on. - - returns: An observable sequence that contains a range of sequential integral numbers. - */ - public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RangeProducer(start: start, count: count, scheduler: scheduler) - } -} - -final private class RangeProducer: Producer { - fileprivate let _start: E - fileprivate let _count: E - fileprivate let _scheduler: ImmediateSchedulerType - - init(start: E, count: E, scheduler: ImmediateSchedulerType) { - guard count >= 0 else { - rxFatalError("count can't be negative") - } - - guard start &+ (count - 1) >= start || count == 0 else { - rxFatalError("overflow of count") - } - - self._start = start - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = RangeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class RangeSink: Sink where O.E: RxAbstractInteger { - typealias Parent = RangeProducer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(0 as O.E) { i, recurse in - if i < self._parent._count { - self.forwardOn(.next(self._parent._start + i)) - recurse(i + 1) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift deleted file mode 100644 index 5b3efd82e52..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// Reduce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -extension ObservableType { - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - parameter mapResult: A function to transform the final accumulator value into the result value. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) - } - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } -} - -final private class ReduceSink: Sink, ObserverType { - typealias ResultType = O.E - typealias Parent = Reduce - - private let _parent: Parent - private var _accumulation: AccumulateType - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._accumulation = parent._seed - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - self._accumulation = try self._parent._accumulator(self._accumulation, value) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - do { - let result = try self._parent._mapResult(self._accumulation) - self.forwardOn(.next(result)) - self.forwardOn(.completed) - self.dispose() - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } -} - -final private class Reduce: Producer { - typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType - typealias ResultSelectorType = (AccumulateType) throws -> ResultType - - fileprivate let _source: Observable - fileprivate let _seed: AccumulateType - fileprivate let _accumulator: AccumulatorType - fileprivate let _mapResult: ResultSelectorType - - init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { - self._source = source - self._seed = seed - self._accumulator = accumulator - self._mapResult = mapResult - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Repeat.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Repeat.swift deleted file mode 100644 index f430c90b819..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Repeat.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Repeat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages. - - - seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html) - - - parameter element: Element to repeat. - - parameter scheduler: Scheduler to run the producer loop on. - - returns: An observable sequence that repeats the given element infinitely. - */ - public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RepeatElement(element: element, scheduler: scheduler) - } -} - -final private class RepeatElement: Producer { - fileprivate let _element: Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(element: Element, scheduler: ImmediateSchedulerType) { - self._element = element - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - - return (sink: sink, subscription: subscription) - } -} - -final private class RepeatElementSink: Sink { - typealias Parent = RepeatElement - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(self._parent._element) { e, recurse in - self.forwardOn(.next(e)) - recurse(e) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift deleted file mode 100644 index ce82df9bcc8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// RetryWhen.swift -// RxSwift -// -// Created by Junior B. on 06/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } -} - -final private class RetryTriggerSink - : ObserverType where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { - typealias E = TriggerObservable.E - - typealias Parent = RetryWhenSequenceSinkIter - - fileprivate let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent._parent._lastError = nil - self._parent._parent.schedule(.moveNext) - case .error(let e): - self._parent._parent.forwardOn(.error(e)) - self._parent._parent.dispose() - case .completed: - self._parent._parent.forwardOn(.completed) - self._parent._parent.dispose() - } - } -} - -final private class RetryWhenSequenceSinkIter - : ObserverType - , Disposable where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { - typealias E = O.E - typealias Parent = RetryWhenSequenceSink - - fileprivate let _parent: Parent - fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() - fileprivate let _subscription: Disposable - - init(parent: Parent, subscription: Disposable) { - self._parent = parent - self._subscription = subscription - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error(let error): - self._parent._lastError = error - - if let failedWith = error as? Error { - // dispose current subscription - self._subscription.dispose() - - let errorHandlerSubscription = self._parent._notifier.subscribe(RetryTriggerSink(parent: self)) - self._errorHandlerSubscription.setDisposable(errorHandlerSubscription) - self._parent._errorSubject.on(.next(failedWith)) - } - else { - self._parent.forwardOn(.error(error)) - self._parent.dispose() - } - case .completed: - self._parent.forwardOn(event) - self._parent.dispose() - } - } - - final func dispose() { - self._subscription.dispose() - self._errorHandlerSubscription.dispose() - } -} - -final private class RetryWhenSequenceSink - : TailRecursiveSink where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { - typealias Element = O.E - typealias Parent = RetryWhenSequence - - let _lock = RecursiveLock() - - fileprivate let _parent: Parent - - fileprivate var _lastError: Swift.Error? - fileprivate let _errorSubject = PublishSubject() - fileprivate let _handler: Observable - fileprivate let _notifier = PublishSubject() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._handler = parent._notificationHandler(self._errorSubject).asObservable() - super.init(observer: observer, cancel: cancel) - } - - override func done() { - if let lastError = self._lastError { - self.forwardOn(.error(lastError)) - self._lastError = nil - } - else { - self.forwardOn(.completed) - } - - self.dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - // It is important to always return `nil` here because there are sideffects in the `run` method - // that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this - // case. - return nil - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - let subscription = SingleAssignmentDisposable() - let iter = RetryWhenSequenceSinkIter(parent: self, subscription: subscription) - subscription.setDisposable(source.subscribe(iter)) - return iter - } - - override func run(_ sources: SequenceGenerator) -> Disposable { - let triggerSubscription = self._handler.subscribe(self._notifier.asObserver()) - let superSubscription = super.run(sources) - return Disposables.create(superSubscription, triggerSubscription) - } -} - -final private class RetryWhenSequence: Producer where S.Iterator.Element: ObservableType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _notificationHandler: (Observable) -> TriggerObservable - - init(sources: S, notificationHandler: @escaping (Observable) -> TriggerObservable) { - self._sources = sources - self._notificationHandler = notificationHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = RetryWhenSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run((self._sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift deleted file mode 100644 index a930f0d456e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// Sample.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Samples the source observable sequence using a sampler observable sequence producing sampling ticks. - - Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. - - **In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.** - - - seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html) - - - parameter sampler: Sampling tick sequence. - - returns: Sampled observable sequence. - */ - public func sample(_ sampler: O) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable()) - } -} - -final private class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = SampleType - - typealias Parent = SampleSequenceSink - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next, .completed: - if let element = _parent._element { - self._parent._element = nil - self._parent.forwardOn(.next(element)) - } - - if self._parent._atEnd { - self._parent.forwardOn(.completed) - self._parent.dispose() - } - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - } - } -} - -final private class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias Parent = Sample - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - // state - fileprivate var _element = nil as Element? - fileprivate var _atEnd = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self._sourceSubscription.setDisposable(self._parent._source.subscribe(self)) - let samplerSubscription = self._parent._sampler.subscribe(SamplerSink(parent: self)) - - return Disposables.create(_sourceSubscription, samplerSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._element = element - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self._atEnd = true - self._sourceSubscription.dispose() - } - } - -} - -final private class Sample: Producer { - fileprivate let _source: Observable - fileprivate let _sampler: Observable - - init(source: Observable, sampler: Observable) { - self._source = source - self._sampler = sampler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift deleted file mode 100644 index c6df6084e9b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// Scan.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: An accumulator function to be invoked on each element. - - returns: An observable sequence containing the accumulated values. - */ - public func scan(into seed: A, accumulator: @escaping (inout A, E) throws -> Void) - -> Observable { - return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) - } - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: An accumulator function to be invoked on each element. - - returns: An observable sequence containing the accumulated values. - */ - public func scan(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed) { acc, element in - let currentAcc = acc - acc = try accumulator(currentAcc, element) - } - } -} - -final private class ScanSink: Sink, ObserverType { - typealias Accumulate = O.E - typealias Parent = Scan - typealias E = ElementType - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - try self._parent._accumulator(&self._accumulate, element) - self.forwardOn(.next(self._accumulate)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } - -} - -final private class Scan: Producer { - typealias Accumulator = (inout Accumulate, Element) throws -> Void - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - self._source = source - self._seed = seed - self._accumulator = accumulator - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift deleted file mode 100644 index a7f6450a327..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// Sequence.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - // MARK: of - - /** - This method creates a new Observable instance with a variable number of elements. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter elements: Elements to generate. - - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediately on subscription. - - returns: The observable sequence whose elements are pulled from the given arguments. - */ - public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: elements, scheduler: scheduler) - } -} - -extension ObservableType { - /** - Converts an array to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: array, scheduler: scheduler) - } - - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { - return ObservableSequence(elements: sequence, scheduler: scheduler) - } -} - -final private class ObservableSequenceSink: Sink where S.Iterator.Element == O.E { - typealias Parent = ObservableSequence - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(self._parent._elements.makeIterator()) { iterator, recurse in - var mutableIterator = iterator - if let next = mutableIterator.next() { - self.forwardOn(.next(next)) - recurse(mutableIterator) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final private class ObservableSequence: Producer { - fileprivate let _elements: S - fileprivate let _scheduler: ImmediateSchedulerType - - init(elements: S, scheduler: ImmediateSchedulerType) { - self._elements = elements - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift deleted file mode 100644 index 44e37d9fb73..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift +++ /dev/null @@ -1,458 +0,0 @@ -// -// ShareReplayScope.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/28/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -/// Subject lifetime scope -public enum SubjectLifetimeScope { - /** - **Each connection will have it's own subject instance to store replay events.** - **Connections will be isolated from each another.** - - Configures the underlying implementation to behave equivalent to. - - ``` - source.multicast(makeSubject: { MySubject() }).refCount() - ``` - - **This is the recommended default.** - - This has the following consequences: - * `retry` or `concat` operators will function as expected because terminating the sequence will clear internal state. - * Each connection to source observable sequence will use it's own subject. - * When the number of subscribers drops from 1 to 0 and connection to source sequence is disposed, subject will be cleared. - - - ``` - let xs = Observable.deferred { () -> Observable in - print("Performing work ...") - return Observable.just(Date().timeIntervalSince1970) - } - .share(replay: 1, scope: .whileConnected) - - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - - ``` - - Notice how time interval is different and `Performing work ...` is printed each time) - - ``` - Performing work ... - next 1495998900.82141 - completed - - Performing work ... - next 1495998900.82359 - completed - - Performing work ... - next 1495998900.82444 - completed - - - ``` - - */ - case whileConnected - - /** - **One subject will store replay events for all connections to source.** - **Connections won't be isolated from each another.** - - Configures the underlying implementation behave equivalent to. - - ``` - source.multicast(MySubject()).refCount() - ``` - - This has the following consequences: - * Using `retry` or `concat` operators after this operator usually isn't advised. - * Each connection to source observable sequence will share the same subject. - * After number of subscribers drops from 1 to 0 and connection to source observable sequence is dispose, this operator will - continue holding a reference to the same subject. - If at some later moment a new observer initiates a new connection to source it can potentially receive - some of the stale events received during previous connection. - * After source sequence terminates any new observer will always immediately receive replayed elements and terminal event. - No new subscriptions to source observable sequence will be attempted. - - ``` - let xs = Observable.deferred { () -> Observable in - print("Performing work ...") - return Observable.just(Date().timeIntervalSince1970) - } - .share(replay: 1, scope: .forever) - - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - ``` - - Notice how time interval is the same, replayed, and `Performing work ...` is printed only once - - ``` - Performing work ... - next 1495999013.76356 - completed - - next 1495999013.76356 - completed - - next 1495999013.76356 - completed - ``` - - */ - case forever -} - -extension ObservableType { - - /** - Returns an observable sequence that **shares a single subscription to the underlying sequence**, and immediately upon subscription replays elements in buffer. - - This operator is equivalent to: - * `.whileConnected` - ``` - // Each connection will have it's own subject instance to store replay events. - // Connections will be isolated from each another. - source.multicast(makeSubject: { Replay.create(bufferSize: replay) }).refCount() - ``` - * `.forever` - ``` - // One subject will store replay events for all connections to source. - // Connections won't be isolated from each another. - source.multicast(Replay.create(bufferSize: replay)).refCount() - ``` - - It uses optimized versions of the operators for most common operations. - - - parameter replay: Maximum element count of the replay buffer. - - parameter scope: Lifetime scope of sharing subject. For more information see `SubjectLifetimeScope` enum. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - public func share(replay: Int = 0, scope: SubjectLifetimeScope = .whileConnected) - -> Observable { - switch scope { - case .forever: - switch replay { - case 0: return self.multicast(PublishSubject()).refCount() - default: return self.multicast(ReplaySubject.create(bufferSize: replay)).refCount() - } - case .whileConnected: - switch replay { - case 0: return ShareWhileConnected(source: self.asObservable()) - case 1: return ShareReplay1WhileConnected(source: self.asObservable()) - default: return self.multicast(makeSubject: { ReplaySubject.create(bufferSize: replay) }).refCount() - } - } - } -} - -fileprivate final class ShareReplay1WhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - typealias E = Element - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - typealias Parent = ShareReplay1WhileConnected - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - - private let _lock: RecursiveLock - private var _disposed: Bool = false - fileprivate var _observers = Observers() - fileprivate var _element: Element? - - init(parent: Parent, lock: RecursiveLock) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next(let element): - self._element = element - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { - self._lock.lock(); defer { self._lock.unlock() } - if let element = self._element { - observer.on(.next(element)) - } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._subscription.dispose() - } - } - - @inline(__always) - final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return false - } - - if self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private class ShareReplay1WhileConnected - : Observable { - - fileprivate typealias Connection = ShareReplay1WhileConnectedConnection - - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - fileprivate var _connection: Connection? - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareReplay1WhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} - -fileprivate final class ShareWhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - typealias E = Element - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - typealias Parent = ShareWhileConnected - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - - private let _lock: RecursiveLock - private var _disposed: Bool = false - fileprivate var _observers = Observers() - - init(parent: Parent, lock: RecursiveLock) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next: - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { - self._lock.lock(); defer { self._lock.unlock() } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._subscription.dispose() - } - } - - @inline(__always) - final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return false - } - - if self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private class ShareWhileConnected - : Observable { - - fileprivate typealias Connection = ShareWhileConnectedConnection - - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - fileprivate var _connection: Connection? - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareWhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift deleted file mode 100644 index cf40b65e3d3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// SingleAsync.swift -// RxSwift -// -// Created by Junior B. on 09/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - The single operator is similar to first, but throws a `RxError.noElements` or `RxError.moreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single() - -> Observable { - return SingleAsync(source: self.asObservable()) - } - - /** - The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return SingleAsync(source: self.asObservable(), predicate: predicate) - } -} - -fileprivate final class SingleAsyncSink : Sink, ObserverType { - typealias ElementType = O.E - typealias Parent = SingleAsync - typealias E = ElementType - - private let _parent: Parent - private var _seenValue: Bool = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let forward = try self._parent._predicate?(value) ?? true - if !forward { - return - } - } - catch let error { - self.forwardOn(.error(error as Swift.Error)) - self.dispose() - return - } - - if self._seenValue { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - return - } - - self._seenValue = true - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._seenValue { - self.forwardOn(.completed) - } else { - self.forwardOn(.error(RxError.noElements)) - } - self.dispose() - } - } -} - -final class SingleAsync: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate? - - init(source: Observable, predicate: Predicate? = nil) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift deleted file mode 100644 index 9b1018b6100..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Sink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Sink : Disposable { - fileprivate let _observer: O - fileprivate let _cancel: Cancelable - fileprivate let _disposed = AtomicInt(0) - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - init(observer: O, cancel: Cancelable) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - self._observer = observer - self._cancel = cancel - } - - final func forwardOn(_ event: Event) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { self._synchronizationTracker.unregister() } - #endif - if isFlagSet(self._disposed, 1) { - return - } - self._observer.on(event) - } - - final func forwarder() -> SinkForward { - return SinkForward(forward: self) - } - - final var disposed: Bool { - return isFlagSet(self._disposed, 1) - } - - func dispose() { - fetchOr(self._disposed, 1) - self._cancel.dispose() - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} - -final class SinkForward: ObserverType { - typealias E = O.E - - private let _forward: Sink - - init(forward: Sink) { - self._forward = forward - } - - final func on(_ event: Event) { - switch event { - case .next: - self._forward._observer.on(event) - case .error, .completed: - self._forward._observer.on(event) - self._forward._cancel.dispose() - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift deleted file mode 100644 index bc49283fdb4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift +++ /dev/null @@ -1,159 +0,0 @@ -// -// Skip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter count: The number of elements to skip before returning the remaining elements. - - returns: An observable sequence that contains the elements that occur after the specified index in the input sequence. - */ - public func skip(_ count: Int) - -> Observable { - return SkipCount(source: self.asObservable(), count: count) - } -} - -extension ObservableType { - - /** - Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter duration: Duration for skipping elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. - */ - public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// count version - -final private class SkipCountSink: Sink, ObserverType { - typealias Element = O.E - typealias Parent = SkipCount - - let parent: Parent - - var remaining: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - self.remaining = parent.count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if self.remaining <= 0 { - self.forwardOn(.next(value)) - } - else { - self.remaining -= 1 - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class SkipCount: Producer { - let source: Observable - let count: Int - - init(source: Observable, count: Int) { - self.source = source - self.count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} - -// time version - -final private class SkipTimeSink: Sink, ObserverType where O.E == ElementType { - typealias Parent = SkipTime - typealias Element = ElementType - - let parent: Parent - - // state - var open = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if self.open { - self.forwardOn(.next(value)) - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func tick() { - self.open = true - } - - func run() -> Disposable { - let disposeTimer = self.parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = self.parent.source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final private class SkipTime: Producer { - let source: Observable - let duration: RxTimeInterval - let scheduler: SchedulerType - - init(source: Observable, duration: RxTimeInterval, scheduler: SchedulerType) { - self.source = source - self.scheduler = scheduler - self.duration = duration - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift deleted file mode 100644 index 7681b14143d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// SkipUntil.swift -// RxSwift -// -// Created by Yury Korolev on 10/3/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns the elements from the source observable sequence that are emitted after the other observable sequence produces an element. - - - seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html) - - - parameter other: Observable sequence that starts propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. - */ - public func skipUntil(_ other: O) - -> Observable { - return SkipUntil(source: self.asObservable(), other: other.asObservable()) - } -} - -final private class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = SkipUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent._forwardElements = true - self._subscription.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif - -} - - -final private class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = SkipUntil - - let _lock = RecursiveLock() - fileprivate let _parent: Parent - fileprivate var _forwardElements = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if self._forwardElements { - self.forwardOn(event) - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._forwardElements { - self.forwardOn(event) - } - self.dispose() - } - } - - func run() -> Disposable { - let sourceSubscription = self._parent._source.subscribe(self) - let otherObserver = SkipUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - self._sourceSubscription.setDisposable(sourceSubscription) - otherObserver._subscription.setDisposable(otherSubscription) - - return Disposables.create(_sourceSubscription, otherObserver._subscription) - } -} - -final private class SkipUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift deleted file mode 100644 index a0fbdf5585e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// SkipWhile.swift -// RxSwift -// -// Created by Yury Korolev on 10/9/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { - return SkipWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class SkipWhileSink: Sink, ObserverType { - typealias Element = O.E - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - } - - if self._running { - self.forwardOn(.next(value)) - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/StartWith.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/StartWith.swift deleted file mode 100644 index 842f4afbc0c..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/StartWith.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// StartWith.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Prepends a sequence of values to an observable sequence. - - - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) - - - parameter elements: Elements to prepend to the specified sequence. - - returns: The source sequence prepended with the specified values. - */ - public func startWith(_ elements: E ...) - -> Observable { - return StartWith(source: self.asObservable(), elements: elements) - } -} - -final private class StartWith: Producer { - let elements: [Element] - let source: Observable - - init(source: Observable, elements: [Element]) { - self.source = source - self.elements = elements - super.init() - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - for e in self.elements { - observer.on(.next(e)) - } - - return (sink: Disposables.create(), subscription: self.source.subscribe(observer)) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift deleted file mode 100644 index 2d0d3485324..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// SubscribeOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Wraps the source sequence in order to run its subscription and unsubscription logic on the specified - scheduler. - - This operation is not commonly used. - - This only performs the side-effects of subscription and unsubscription on the specified scheduler. - - In order to invoke observer callbacks on a `scheduler`, use `observeOn`. - - - seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html) - - - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. - - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. - */ - public func subscribeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - return SubscribeOn(source: self, scheduler: scheduler) - } -} - -final private class SubscribeOnSink: Sink, ObserverType where Ob.E == O.E { - typealias Element = O.E - typealias Parent = SubscribeOn - - let parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.forwardOn(event) - - if event.isStopEvent { - self.dispose() - } - } - - func run() -> Disposable { - let disposeEverything = SerialDisposable() - let cancelSchedule = SingleAssignmentDisposable() - - disposeEverything.disposable = cancelSchedule - - let disposeSchedule = self.parent.scheduler.schedule(()) { _ -> Disposable in - let subscription = self.parent.source.subscribe(self) - disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) - return Disposables.create() - } - - cancelSchedule.setDisposable(disposeSchedule) - - return disposeEverything - } -} - -final private class SubscribeOn: Producer { - let source: Ob - let scheduler: ImmediateSchedulerType - - init(source: Ob, scheduler: ImmediateSchedulerType) { - self.source = source - self.scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { - let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift deleted file mode 100644 index 5139f0eccd6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift +++ /dev/null @@ -1,233 +0,0 @@ -// -// Switch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Projects each element of an observable sequence into a new sequence of observable sequences and then - transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - - It is a combination of `map` + `switchLatest` operator - - - seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an - Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func flatMapLatest(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapLatest(source: self.asObservable(), selector: selector) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Transforms an observable sequence of observable sequences into an observable sequence - producing values only from the most recent observable sequence. - - Each time a new inner observable sequence is received, unsubscribe from the - previous inner observable sequence. - - - seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html) - - - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func switchLatest() -> Observable { - return Switch(source: self.asObservable()) - } -} - -private class SwitchSink - : Sink - , ObserverType where S.E == O.E { - typealias E = SourceType - - fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() - fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() - - let _lock = RecursiveLock() - - // state - fileprivate var _stopped = false - fileprivate var _latest = 0 - fileprivate var _hasLatest = false - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - self._subscriptions.setDisposable(subscription) - return Disposables.create(_subscriptions, _innerSubscription) - } - - func performMap(_ element: SourceType) throws -> S { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: E) -> (Int, Observable)? { - self._lock.lock(); defer { self._lock.unlock() } // { - do { - let observable = try self.performMap(element).asObservable() - self._hasLatest = true - self._latest = self._latest &+ 1 - return (self._latest, observable) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let (latest, observable) = self.nextElementArrived(element: element) { - let d = SingleAssignmentDisposable() - self._innerSubscription.disposable = d - - let observer = SwitchSinkIter(parent: self, id: latest, _self: d) - let disposable = observable.subscribe(observer) - d.setDisposable(disposable) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - self._stopped = true - - self._subscriptions.dispose() - - if !self._hasLatest { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final private class SwitchSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = S.E - typealias Parent = SwitchSink - - fileprivate let _parent: Parent - fileprivate let _id: Int - fileprivate let _self: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, id: Int, _self: Disposable) { - self._parent = parent - self._id = id - self._self = _self - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: break - case .error, .completed: - self._self.dispose() - } - - if self._parent._latest != self._id { - return - } - - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent._hasLatest = false - if self._parent._stopped { - self._parent.forwardOn(event) - self._parent.dispose() - } - } - } -} - -// MARK: Specializations - -final private class SwitchIdentitySink: SwitchSink where O.E == S.E { - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: S) throws -> S { - return element - } -} - -final private class MapSwitchSink: SwitchSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - fileprivate let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try self._selector(element) - } -} - -// MARK: Producers - -final private class Switch: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = SwitchIdentitySink(observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class FlatMapLatest: Producer { - typealias Selector = (SourceType) throws -> S - - fileprivate let _source: Observable - fileprivate let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MapSwitchSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift deleted file mode 100644 index 2ce6f246a27..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// SwitchIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns the elements of the specified sequence or `switchTo` sequence if the sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter switchTo: Observable sequence being returned when source sequence is empty. - - returns: Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements. - */ - public func ifEmpty(switchTo other: Observable) -> Observable { - return SwitchIfEmpty(source: self.asObservable(), ifEmpty: other) - } -} - -final private class SwitchIfEmpty: Producer { - - private let _source: Observable - private let _ifEmpty: Observable - - init(source: Observable, ifEmpty: Observable) { - self._source = source - self._ifEmpty = ifEmpty - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SwitchIfEmptySink(ifEmpty: self._ifEmpty, - observer: observer, - cancel: cancel) - let subscription = sink.run(self._source.asObservable()) - - return (sink: sink, subscription: subscription) - } -} - -final private class SwitchIfEmptySink: Sink - , ObserverType { - typealias E = O.E - - private let _ifEmpty: Observable - private var _isEmpty = true - private let _ifEmptySubscription = SingleAssignmentDisposable() - - init(ifEmpty: Observable, observer: O, cancel: Cancelable) { - self._ifEmpty = ifEmpty - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - return Disposables.create(subscription, _ifEmptySubscription) - } - - func on(_ event: Event) { - switch event { - case .next: - self._isEmpty = false - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - guard self._isEmpty else { - self.forwardOn(.completed) - self.dispose() - return - } - let ifEmptySink = SwitchIfEmptySinkIter(parent: self) - self._ifEmptySubscription.setDisposable(self._ifEmpty.subscribe(ifEmptySink)) - } - } -} - -final private class SwitchIfEmptySinkIter - : ObserverType { - typealias E = O.E - typealias Parent = SwitchIfEmptySink - - private let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent.forwardOn(event) - self._parent.dispose() - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift deleted file mode 100644 index cbfb57fcac1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift +++ /dev/null @@ -1,180 +0,0 @@ -// -// Take.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the start of an observable sequence. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter count: The number of elements to return. - - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. - */ - public func take(_ count: Int) - -> Observable { - if count == 0 { - return Observable.empty() - } - else { - return TakeCount(source: self.asObservable(), count: count) - } - } -} - -extension ObservableType { - - /** - Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter duration: Duration for taking elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. - */ - public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// count version - -final private class TakeCountSink: Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeCount - - private let _parent: Parent - - private var _remaining: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._remaining = parent._count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if self._remaining > 0 { - self._remaining -= 1 - - self.forwardOn(.next(value)) - - if self._remaining == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeCount: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -// time version - -final private class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == ElementType { - typealias Parent = TakeTime - typealias E = ElementType - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func tick() { - self._lock.lock(); defer { self._lock.unlock() } - - self.forwardOn(.completed) - self.dispose() - } - - func run() -> Disposable { - let disposeTimer = self._parent._scheduler.scheduleRelative((), dueTime: self._parent._duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = self._parent._source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final private class TakeTime: Producer { - typealias TimeInterval = RxTimeInterval - - fileprivate let _source: Observable - fileprivate let _duration: TimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { - self._source = source - self._scheduler = scheduler - self._duration = duration - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift deleted file mode 100644 index 22672964282..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// TakeLast.swift -// RxSwift -// -// Created by Tomi Koskinen on 25/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the end of an observable sequence. - - This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. - - - seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html) - - - parameter count: Number of elements to take from the end of the source sequence. - - returns: An observable sequence containing the specified number of elements from the end of the source sequence. - */ - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: self.asObservable(), count: count) - } -} - -final private class TakeLastSink: Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeLast - - private let _parent: Parent - - private var _elements: Queue - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._elements = Queue(capacity: parent._count + 1) - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._elements.enqueue(value) - if self._elements.count > self._parent._count { - _ = self._elements.dequeue() - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - for e in self._elements { - self.forwardOn(.next(e)) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class TakeLast: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift deleted file mode 100644 index b0d6927c968..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift +++ /dev/null @@ -1,227 +0,0 @@ -// -// TakeUntil.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns the elements from the source observable sequence until the other observable sequence produces an element. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter other: Observable sequence that terminates propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. - */ - public func takeUntil(_ other: O) - -> Observable { - return TakeUntil(source: self.asObservable(), other: other.asObservable()) - } - - /** - Returns elements from an observable sequence until the specified condition is true. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter behavior: Whether or not to include the last element matching the predicate. - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test passes. - */ - public func takeUntil(_ behavior: TakeUntilBehavior, - predicate: @escaping (E) throws -> Bool) - -> Observable { - return TakeUntilPredicate(source: self.asObservable(), - behavior: behavior, - predicate: predicate) - } -} - -/// Behaviors for the `takeUntil(_ behavior:predicate:)` operator. -public enum TakeUntilBehavior { - /// Include the last element matching the predicate. - case inclusive - - /// Exclude the last element matching the predicate. - case exclusive -} - -// MARK: - TakeUntil Observable -final private class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = TakeUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - fileprivate let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(.completed) - self._parent.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} - -final private class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = TakeUntil - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func run() -> Disposable { - let otherObserver = TakeUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - otherObserver._subscription.setDisposable(otherSubscription) - let sourceSubscription = self._parent._source.subscribe(self) - - return Disposables.create(sourceSubscription, otherObserver._subscription) - } -} - -final private class TakeUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// MARK: - TakeUntil Predicate -final private class TakeUntilPredicateSink - : Sink, ObserverType { - typealias Element = O.E - typealias Parent = TakeUntilPredicate - - fileprivate let _parent: Parent - fileprivate var _running = true - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - if self._parent._behavior == .inclusive { - self.forwardOn(.next(value)) - } - - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeUntilPredicate: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - fileprivate let _behavior: TakeUntilBehavior - - init(source: Observable, - behavior: TakeUntilBehavior, - predicate: @escaping Predicate) { - self._source = source - self._behavior = behavior - self._predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeUntilPredicateSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift deleted file mode 100644 index 1e866f88c0f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// TakeWhile.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - public func takeWhile(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return TakeWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class TakeWhileSink - : Sink - , ObserverType { - typealias Element = O.E - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift deleted file mode 100644 index c31ae746991..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift +++ /dev/null @@ -1,162 +0,0 @@ -// -// Throttle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -extension ObservableType { - - /** - Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. - - This operator makes sure that no two elements are emitted in less then dueTime. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. - - parameter scheduler: Scheduler to run the throttle timers on. - - returns: The throttled sequence. - */ - public func throttle(_ dueTime: RxTimeInterval, latest: Bool = true, scheduler: SchedulerType) - -> Observable { - return Throttle(source: self.asObservable(), dueTime: dueTime, latest: latest, scheduler: scheduler) - } -} - -final private class ThrottleSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Throttle - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _lastUnsentElement: Element? - private var _lastSentTime: Date? - private var _completed: Bool = false - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - let now = self._parent._scheduler.now - - let timeIntervalSinceLast: RxTimeInterval - - if let lastSendingTime = self._lastSentTime { - timeIntervalSinceLast = now.timeIntervalSince(lastSendingTime) - } - else { - timeIntervalSinceLast = self._parent._dueTime - } - - let couldSendNow = timeIntervalSinceLast >= self._parent._dueTime - - if couldSendNow { - self.sendNow(element: element) - return - } - - if !self._parent._latest { - return - } - - let isThereAlreadyInFlightRequest = self._lastUnsentElement != nil - - self._lastUnsentElement = element - - if isThereAlreadyInFlightRequest { - return - } - - let scheduler = self._parent._scheduler - let dueTime = self._parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - - d.setDisposable(scheduler.scheduleRelative(0, dueTime: dueTime - timeIntervalSinceLast, action: self.propagate)) - case .error: - self._lastUnsentElement = nil - self.forwardOn(event) - self.dispose() - case .completed: - if self._lastUnsentElement != nil { - self._completed = true - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } - - private func sendNow(element: Element) { - self._lastUnsentElement = nil - self.forwardOn(.next(element)) - // in case element processing takes a while, this should give some more room - self._lastSentTime = self._parent._scheduler.now - } - - func propagate(_: Int) -> Disposable { - self._lock.lock(); defer { self._lock.unlock() } // { - if let lastUnsentElement = self._lastUnsentElement { - self.sendNow(element: lastUnsentElement) - } - - if self._completed { - self.forwardOn(.completed) - self.dispose() - } - // } - return Disposables.create() - } -} - -final private class Throttle: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _latest: Bool - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, latest: Bool, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._latest = latest - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift deleted file mode 100644 index f37bf762063..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// Timeout.swift -// RxSwift -// -// Created by Tomi Koskinen on 13/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: An observable sequence with a `RxError.timeout` in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) - } - - /** - Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter other: Sequence to return in case of a timeout. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: The source sequence switching to the other sequence in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) - -> Observable where E == O.E { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) - } -} - -final private class TimeoutSink: Sink, LockOwnerType, ObserverType { - typealias E = O.E - typealias Parent = Timeout - - private let _parent: Parent - - let _lock = RecursiveLock() - - private let _timerD = SerialDisposable() - private let _subscription = SerialDisposable() - - private var _id = 0 - private var _switched = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let original = SingleAssignmentDisposable() - self._subscription.disposable = original - - self._createTimeoutTimer() - - original.setDisposable(self._parent._source.subscribe(self)) - - return Disposables.create(_subscription, _timerD) - } - - func on(_ event: Event) { - switch event { - case .next: - var onNextWins = false - - self._lock.performLocked { - onNextWins = !self._switched - if onNextWins { - self._id = self._id &+ 1 - } - } - - if onNextWins { - self.forwardOn(event) - self._createTimeoutTimer() - } - case .error, .completed: - var onEventWins = false - - self._lock.performLocked { - onEventWins = !self._switched - if onEventWins { - self._id = self._id &+ 1 - } - } - - if onEventWins { - self.forwardOn(event) - self.dispose() - } - } - } - - private func _createTimeoutTimer() { - if self._timerD.isDisposed { - return - } - - let nextTimer = SingleAssignmentDisposable() - self._timerD.disposable = nextTimer - - let disposeSchedule = self._parent._scheduler.scheduleRelative(self._id, dueTime: self._parent._dueTime) { state in - - var timerWins = false - - self._lock.performLocked { - self._switched = (state == self._id) - timerWins = self._switched - } - - if timerWins { - self._subscription.disposable = self._parent._other.subscribe(self.forwarder()) - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposeSchedule) - } -} - - -final private class Timeout: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _other: Observable - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, other: Observable, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._other = other - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift deleted file mode 100644 index 1715e1ec5e9..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// Timer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E : RxAbstractInteger { - /** - Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. - - - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) - - - parameter period: Period for producing the values in the resulting sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence that produces a value after each period. - */ - public static func interval(_ period: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timer( - dueTime: period, - period: period, - scheduler: scheduler - ) - } -} - -extension ObservableType where E: RxAbstractInteger { - /** - Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. - - - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) - - - parameter dueTime: Relative time at which to produce the first value. - - parameter period: Period to produce subsequent values. - - parameter scheduler: Scheduler to run timers on. - - returns: An observable sequence that produces a value after due time has elapsed and then each period. - */ - public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) - -> Observable { - return Timer( - dueTime: dueTime, - period: period, - scheduler: scheduler - ) - } -} - -import Foundation - -final private class TimerSink : Sink where O.E : RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - private let _lock = RecursiveLock() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.schedulePeriodic(0 as O.E, startAfter: self._parent._dueTime, period: self._parent._period!) { state in - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.next(state)) - return state &+ 1 - } - } -} - -final private class TimerOneOffSink: Sink where O.E: RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRelative(self, dueTime: self._parent._dueTime) { [unowned self] _ -> Disposable in - self.forwardOn(.next(0)) - self.forwardOn(.completed) - self.dispose() - - return Disposables.create() - } - } -} - -final private class Timer: Producer { - fileprivate let _scheduler: SchedulerType - fileprivate let _dueTime: RxTimeInterval - fileprivate let _period: RxTimeInterval? - - init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { - self._scheduler = scheduler - self._dueTime = dueTime - self._period = period - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - if self._period != nil { - let sink = TimerSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - else { - let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift deleted file mode 100644 index 5cf1aa431fd..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ToArray.swift -// RxSwift -// -// Created by Junior B. on 20/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -extension ObservableType { - - /** - Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates. - - For aggregation behavior see `reduce`. - - - seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html) - - - returns: An observable sequence containing all the emitted elements as array. - */ - public func toArray() - -> Observable<[E]> { - return ToArray(source: self.asObservable()) - } -} - -final private class ToArraySink: Sink, ObserverType where O.E == [SourceType] { - typealias Parent = ToArray - - let _parent: Parent - var _list = [SourceType]() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._list.append(value) - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - self.forwardOn(.next(self._list)) - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class ToArray: Producer<[SourceType]> { - let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] { - let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift deleted file mode 100644 index 3651dc9a005..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Using.swift -// RxSwift -// -// Created by Yury Korolev on 10/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. - - - seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html) - - - parameter resourceFactory: Factory function to obtain a resource object. - - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. - - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. - */ - public static func using(_ resourceFactory: @escaping () throws -> Resource, observableFactory: @escaping (Resource) throws -> Observable) -> Observable { - return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) - } -} - -final private class UsingSink: Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = Using - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - var disposable = Disposables.create() - - do { - let resource = try self._parent._resourceFactory() - disposable = resource - let source = try self._parent._observableFactory(resource) - - return Disposables.create( - source.subscribe(self), - disposable - ) - } catch let error { - return Disposables.create( - Observable.error(error).subscribe(self), - disposable - ) - } - } - - func on(_ event: Event) { - switch event { - case let .next(value): - self.forwardOn(.next(value)) - case let .error(error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class Using: Producer { - - typealias E = SourceType - - typealias ResourceFactory = () throws -> ResourceType - typealias ObservableFactory = (ResourceType) throws -> Observable - - fileprivate let _resourceFactory: ResourceFactory - fileprivate let _observableFactory: ObservableFactory - - - init(resourceFactory: @escaping ResourceFactory, observableFactory: @escaping ObservableFactory) { - self._resourceFactory = resourceFactory - self._observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = UsingSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift deleted file mode 100644 index 5de452cabf3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Window.swift -// RxSwift -// -// Created by Junior B. on 29/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. - - - seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html) - - - parameter timeSpan: Maximum time length of a window. - - parameter count: Maximum element count of a window. - - parameter scheduler: Scheduler to run windowing timers on. - - returns: An observable sequence of windows (instances of `Observable`). - */ - public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final private class WindowTimeCountSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where O.E == Observable { - typealias Parent = WindowTimeCount - typealias E = Element - - private let _parent: Parent - - let _lock = RecursiveLock() - - private var _subject = PublishSubject() - private var _count = 0 - private var _windowId = 0 - - private let _timerD = SerialDisposable() - private let _refCountDisposable: RefCountDisposable - private let _groupDisposable = CompositeDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - - _ = self._groupDisposable.insert(self._timerD) - - self._refCountDisposable = RefCountDisposable(disposable: self._groupDisposable) - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - - self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) - self.createTimer(self._windowId) - - _ = self._groupDisposable.insert(self._parent._source.subscribe(self)) - return self._refCountDisposable - } - - func startNewWindowAndCompleteCurrentOne() { - self._subject.on(.completed) - self._subject = PublishSubject() - - self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - var newWindow = false - var newId = 0 - - switch event { - case .next(let element): - self._subject.on(.next(element)) - - do { - _ = try incrementChecked(&self._count) - } catch let e { - self._subject.on(.error(e as Swift.Error)) - self.dispose() - } - - if self._count == self._parent._count { - newWindow = true - self._count = 0 - self._windowId += 1 - newId = self._windowId - self.startNewWindowAndCompleteCurrentOne() - } - - case .error(let error): - self._subject.on(.error(error)) - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._subject.on(.completed) - self.forwardOn(.completed) - self.dispose() - } - - if newWindow { - self.createTimer(newId) - } - } - - func createTimer(_ windowId: Int) { - if self._timerD.isDisposed { - return - } - - if self._windowId != windowId { - return - } - - let nextTimer = SingleAssignmentDisposable() - - self._timerD.disposable = nextTimer - - let scheduledRelative = self._parent._scheduler.scheduleRelative(windowId, dueTime: self._parent._timeSpan) { previousWindowId in - - var newId = 0 - - self._lock.performLocked { - if previousWindowId != self._windowId { - return - } - - self._count = 0 - self._windowId = self._windowId &+ 1 - newId = self._windowId - self.startNewWindowAndCompleteCurrentOne() - } - - self.createTimer(newId) - - return Disposables.create() - } - - nextTimer.setDisposable(scheduledRelative) - } -} - -final private class WindowTimeCount: Producer> { - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - self._source = source - self._timeSpan = timeSpan - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { - let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift deleted file mode 100644 index 1a1b5949845..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// WithLatestFrom.swift -// RxSwift -// -// Created by Yury Korolev on 10/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { - return WithLatestFrom(first: self.asObservable(), second: second.asObservable(), resultSelector: resultSelector) - } - - /** - Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emits an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO) -> Observable { - return WithLatestFrom(first: self.asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} - -final private class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ResultType = O.E - typealias Parent = WithLatestFrom - typealias E = FirstType - - fileprivate let _parent: Parent - - var _lock = RecursiveLock() - fileprivate var _latest: SecondType? - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let sndSubscription = SingleAssignmentDisposable() - let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - - sndSubscription.setDisposable(self._parent._second.subscribe(sndO)) - let fstSubscription = self._parent._first.subscribe(self) - - return Disposables.create(fstSubscription, sndSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - guard let latest = self._latest else { return } - do { - let res = try self._parent._resultSelector(value, latest) - - self.forwardOn(.next(res)) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case let .error(error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - - typealias ResultType = O.E - typealias Parent = WithLatestFromSink - typealias E = SecondType - - private let _parent: Parent - private let _disposable: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, disposable: Disposable) { - self._parent = parent - self._disposable = disposable - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - self._parent._latest = value - case .completed: - self._disposable.dispose() - case let .error(error): - self._parent.forwardOn(.error(error)) - self._parent.dispose() - } - } -} - -final private class WithLatestFrom: Producer { - typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - - fileprivate let _first: Observable - fileprivate let _second: Observable - fileprivate let _resultSelector: ResultSelector - - init(first: Observable, second: Observable, resultSelector: @escaping ResultSelector) { - self._first = first - self._second = second - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift deleted file mode 100644 index c2b5819a6c2..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Zip+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable - where C.Iterator.Element: ObservableType { - return ZipCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - Merges the specified observable sequences into one observable sequence whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip(_ collection: C) -> Observable<[E]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { - return ZipCollectionType(sources: collection, resultSelector: { $0 }) - } - -} - -final private class ZipCollectionTypeSink - : Sink where C.Iterator.Element: ObservableConvertibleType { - typealias R = O.E - typealias Parent = ZipCollectionType - typealias SourceElement = C.Iterator.Element.E - - private let _parent: Parent - - private let _lock = RecursiveLock() - - // state - private var _numberOfValues = 0 - private var _values: [Queue] - private var _isDone: [Bool] - private var _numberOfDone = 0 - private var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - self._values = [Queue](repeating: Queue(capacity: 4), count: parent.count) - self._isDone = [Bool](repeating: false, count: parent.count) - self._subscriptions = [SingleAssignmentDisposable]() - self._subscriptions.reserveCapacity(parent.count) - - for _ in 0 ..< parent.count { - self._subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - self._lock.lock(); defer { self._lock.unlock() } // { - switch event { - case .next(let element): - self._values[atIndex].enqueue(element) - - if self._values[atIndex].count == 1 { - self._numberOfValues += 1 - } - - if self._numberOfValues < self._parent.count { - if self._numberOfDone == self._parent.count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - var arguments = [SourceElement]() - arguments.reserveCapacity(self._parent.count) - - // recalculate number of values - self._numberOfValues = 0 - - for i in 0 ..< self._values.count { - arguments.append(self._values[i].dequeue()!) - if !self._values[i].isEmpty { - self._numberOfValues += 1 - } - } - - let result = try self._parent.resultSelector(arguments) - self.forwardOn(.next(result)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - if self._isDone[atIndex] { - return - } - - self._isDone[atIndex] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._parent.count { - self.forwardOn(.completed) - self.dispose() - } - else { - self._subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in self._parent.sources { - let index = j - let source = i.asObservable() - - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - self._subscriptions[j].setDisposable(disposable) - j += 1 - } - - if self._parent.sources.isEmpty { - self.forwardOn(.completed) - } - - return Disposables.create(_subscriptions) - } -} - -final private class ZipCollectionType: Producer where C.Iterator.Element: ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let sources: C - let resultSelector: ResultSelector - let count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - self.sources = sources - self.resultSelector = resultSelector - self.count = Int(Int64(self.sources.count)) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift deleted file mode 100644 index 01992f432d8..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift +++ /dev/null @@ -1,990 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// Zip+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class ZipSink2_ : ZipSink { - typealias R = O.E - typealias Parent = Zip2 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!) - } -} - -final class Zip2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let source1: Observable - let source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class ZipSink3_ : ZipSink { - typealias R = O.E - typealias Parent = Zip3 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!) - } -} - -final class Zip3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class ZipSink4_ : ZipSink { - typealias R = O.E - typealias Parent = Zip4 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!) - } -} - -final class Zip4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class ZipSink5_ : ZipSink { - typealias R = O.E - typealias Parent = Zip5 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!) - } -} - -final class Zip5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class ZipSink6_ : ZipSink { - typealias R = O.E - typealias Parent = Zip6 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!) - } -} - -final class Zip6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class ZipSink7_ : ZipSink { - typealias R = O.E - typealias Parent = Zip7 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - case 6: return !self._values7.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: self._lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - subscription7.setDisposable(self._parent.source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!, self._values7.dequeue()!) - } -} - -final class Zip7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - return Zip8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return Zip8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class ZipSink8_ : ZipSink { - typealias R = O.E - typealias Parent = Zip8 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - var _values8: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - self._parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - case 6: return !self._values7.isEmpty - case 7: return !self._values8.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - - #if swift(>=4.2) - #if !compiler(>=5.0) - return false - #endif - #else - return false - #endif - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: self._lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - let observer8 = ZipObserver(lock: self._lock, parent: self, index: 7, setNextValue: { self._values8.enqueue($0) }, this: subscription8) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - subscription7.setDisposable(self._parent.source7.subscribe(observer7)) - subscription8.setDisposable(self._parent.source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!, self._values7.dequeue()!, self._values8.dequeue()!) - } -} - -final class Zip8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - let source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - self.source8 = source8 - - self._resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift deleted file mode 100644 index 50edf8481da..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// Zip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ZipSinkProtocol : class -{ - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class ZipSink : Sink, ZipSinkProtocol { - typealias Element = O.E - - let _arity: Int - - let _lock = RecursiveLock() - - // state - private var _isDone: [Bool] - - init(arity: Int, observer: O, cancel: Cancelable) { - self._isDone = [Bool](repeating: false, count: arity) - self._arity = arity - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func hasElements(_ index: Int) -> Bool { - rxAbstractMethod() - } - - func next(_ index: Int) { - var hasValueAll = true - - for i in 0 ..< self._arity { - if !self.hasElements(i) { - hasValueAll = false - break - } - } - - if hasValueAll { - do { - let result = try self.getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - else { - var allOthersDone = true - - let arity = self._isDone.count - for i in 0 ..< arity { - if i != index && !self._isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - self.forwardOn(.completed) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - self.forwardOn(.error(error)) - self.dispose() - } - - func done(_ index: Int) { - self._isDone[index] = true - - var allDone = true - - for done in self._isDone where !done { - allDone = false - break - } - - if allDone { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class ZipObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = ElementType - typealias ValueSetter = (ElementType) -> Void - - private var _parent: ZipSinkProtocol? - - let _lock: RecursiveLock - - // state - private let _index: Int - private let _this: Disposable - private let _setNextValue: ValueSetter - - init(lock: RecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { - self._lock = lock - self._parent = parent - self._index = index - self._this = this - self._setNextValue = setNextValue - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - if self._parent != nil { - switch event { - case .next: - break - case .error: - self._this.dispose() - case .completed: - self._this.dispose() - } - } - - if let parent = self._parent { - switch event { - case .next(let value): - self._setNextValue(value) - parent.next(self._index) - case .error(let error): - parent.fail(error) - case .completed: - parent.done(self._index) - } - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift deleted file mode 100644 index 908941ff17c..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// ObserverType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Supports push-style iteration over an observable sequence. -public protocol ObserverType { - /// The type of elements in sequence that observer can observe. - associatedtype E - - /// Notify observer about sequence event. - /// - /// - parameter event: Event that occurred. - func on(_ event: Event) -} - -/// Convenience API extensions to provide alternate next, error, completed events -extension ObserverType { - - /// Convenience method equivalent to `on(.next(element: E))` - /// - /// - parameter element: Next element to send to observer(s) - public func onNext(_ element: E) { - self.on(.next(element)) - } - - /// Convenience method equivalent to `on(.completed)` - public func onCompleted() { - self.on(.completed) - } - - /// Convenience method equivalent to `on(.error(Swift.Error))` - /// - parameter error: Swift.Error to send to observer(s) - public func onError(_ error: Swift.Error) { - self.on(.error(error)) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift deleted file mode 100644 index 765cf1168d3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// AnonymousObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AnonymousObserver : ObserverBase { - typealias Element = ElementType - - typealias EventHandler = (Event) -> Void - - private let _eventHandler : EventHandler - - init(_ eventHandler: @escaping EventHandler) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - self._eventHandler = eventHandler - } - - override func onCore(_ event: Event) { - return self._eventHandler(event) - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift deleted file mode 100644 index 65d05ec0f98..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// ObserverBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class ObserverBase : Disposable, ObserverType { - typealias E = ElementType - - private let _isStopped = AtomicInt(0) - - func on(_ event: Event) { - switch event { - case .next: - if load(self._isStopped) == 0 { - self.onCore(event) - } - case .error, .completed: - if fetchOr(self._isStopped, 1) == 0 { - self.onCore(event) - } - } - } - - func onCore(_ event: Event) { - rxAbstractMethod() - } - - func dispose() { - fetchOr(self._isStopped, 1) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift deleted file mode 100644 index e75a38012e7..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// TailRecursiveSink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum TailRecursiveSinkCommand { - case moveNext - case dispose -} - -#if DEBUG || TRACE_RESOURCES - public var maxTailRecursiveSinkStackSize = 0 -#endif - -/// This class is usually used with `Generator` version of the operators. -class TailRecursiveSink - : Sink - , InvocableWithValueType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Value = TailRecursiveSinkCommand - typealias E = O.E - typealias SequenceGenerator = (generator: S.Iterator, remaining: IntMax?) - - var _generators: [SequenceGenerator] = [] - var _isDisposed = false - var _subscription = SerialDisposable() - - // this is thread safe object - var _gate = AsyncLock>>() - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ sources: SequenceGenerator) -> Disposable { - self._generators.append(sources) - - self.schedule(.moveNext) - - return self._subscription - } - - func invoke(_ command: TailRecursiveSinkCommand) { - switch command { - case .dispose: - self.disposeCommand() - case .moveNext: - self.moveNextCommand() - } - } - - // simple implementation for now - func schedule(_ command: TailRecursiveSinkCommand) { - self._gate.invoke(InvocableScheduledItem(invocable: self, state: command)) - } - - func done() { - self.forwardOn(.completed) - self.dispose() - } - - func extract(_ observable: Observable) -> SequenceGenerator? { - rxAbstractMethod() - } - - // should be done on gate locked - - private func moveNextCommand() { - var next: Observable? - - repeat { - guard let (g, left) = self._generators.last else { - break - } - - if self._isDisposed { - return - } - - self._generators.removeLast() - - var e = g - - guard let nextCandidate = e.next()?.asObservable() else { - continue - } - - // `left` is a hint of how many elements are left in generator. - // In case this is the last element, then there is no need to push - // that generator on stack. - // - // This is an optimization used to make sure in tail recursive case - // there is no memory leak in case this operator is used to generate non terminating - // sequence. - - if let knownOriginalLeft = left { - // `- 1` because generator.next() has just been called - if knownOriginalLeft - 1 >= 1 { - self._generators.append((e, knownOriginalLeft - 1)) - } - } - else { - self._generators.append((e, nil)) - } - - let nextGenerator = self.extract(nextCandidate) - - if let nextGenerator = nextGenerator { - self._generators.append(nextGenerator) - #if DEBUG || TRACE_RESOURCES - if maxTailRecursiveSinkStackSize < self._generators.count { - maxTailRecursiveSinkStackSize = self._generators.count - } - #endif - } - else { - next = nextCandidate - } - } while next == nil - - guard let existingNext = next else { - self.done() - return - } - - let disposable = SingleAssignmentDisposable() - self._subscription.disposable = disposable - disposable.setDisposable(self.subscribeToNext(existingNext)) - } - - func subscribeToNext(_ source: Observable) -> Disposable { - rxAbstractMethod() - } - - func disposeCommand() { - self._isDisposed = true - self._generators.removeAll(keepingCapacity: false) - } - - override func dispose() { - super.dispose() - - self._subscription.dispose() - self._gate.dispose() - - self.schedule(.dispose) - } -} - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift deleted file mode 100644 index b87399664f3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Reactive.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Reactive.swift -// RxSwift -// -// Created by Yury Korolev on 5/2/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/** - Use `Reactive` proxy as customization point for constrained protocol extensions. - - General pattern would be: - - // 1. Extend Reactive protocol with constrain on Base - // Read as: Reactive Extension where Base is a SomeType - extension Reactive where Base: SomeType { - // 2. Put any specific reactive extension for SomeType here - } - - With this approach we can have more specialized methods and properties using - `Base` and not just specialized on common base type. - - */ - -public struct Reactive { - /// Base object to extend. - public let base: Base - - /// Creates extensions with base object. - /// - /// - parameter base: Base object. - public init(_ base: Base) { - self.base = base - } -} - -/// A type that has reactive extensions. -public protocol ReactiveCompatible { - /// Extended type - associatedtype CompatibleType - - /// Reactive extensions. - static var rx: Reactive.Type { get set } - - /// Reactive extensions. - var rx: Reactive { get set } -} - -extension ReactiveCompatible { - /// Reactive extensions. - public static var rx: Reactive.Type { - get { - return Reactive.self - } - set { - // this enables using Reactive to "mutate" base type - } - } - - /// Reactive extensions. - public var rx: Reactive { - get { - return Reactive(self) - } - set { - // this enables using Reactive to "mutate" base object - } - } -} - -import class Foundation.NSObject - -/// Extend NSObject with `rx` proxy. -extension NSObject: ReactiveCompatible { } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift deleted file mode 100644 index a547a8f98cd..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift +++ /dev/null @@ -1,141 +0,0 @@ -// -// Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate let resourceCount = AtomicInt(0) - - /// Resource utilization information - public struct Resources { - /// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. - public static var total: Int32 { - return load(resourceCount) - } - - /// Increments `Resources.total` resource count. - /// - /// - returns: New resource count - public static func incrementTotal() -> Int32 { - return increment(resourceCount) - } - - /// Decrements `Resources.total` resource count - /// - /// - returns: New resource count - public static func decrementTotal() -> Int32 { - return decrement(resourceCount) - } - } -#endif - -/// Swift does not implement abstract methods. This method is used as a runtime check to ensure that methods which intended to be abstract (i.e., they should be implemented in subclasses) are not called directly on the superclass. -func rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.Never { - rxFatalError("Abstract method", file: file, line: line) -} - -func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { - fatalError(lastMessage(), file: file, line: line) -} - -func rxFatalErrorInDebug(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) { - #if DEBUG - fatalError(lastMessage(), file: file, line: line) - #else - print("\(file):\(line): \(lastMessage())") - #endif -} - -func incrementChecked(_ i: inout Int) throws -> Int { - if i == Int.max { - throw RxError.overflow - } - defer { i += 1 } - return i -} - -func decrementChecked(_ i: inout Int) throws -> Int { - if i == Int.min { - throw RxError.overflow - } - defer { i -= 1 } - return i -} - -#if DEBUG - import class Foundation.Thread - final class SynchronizationTracker { - private let _lock = RecursiveLock() - - public enum SynchronizationErrorMessages: String { - case variable = "Two different threads are trying to assign the same `Variable.value` unsynchronized.\n This is undefined behavior because the end result (variable value) is nondeterministic and depends on the \n operating system thread scheduler. This will cause random behavior of your program.\n" - case `default` = "Two different unsynchronized threads are trying to send some event simultaneously.\n This is undefined behavior because the ordering of the effects caused by these events is nondeterministic and depends on the \n operating system thread scheduler. This will result in a random behavior of your program.\n" - } - - private var _threads = [UnsafeMutableRawPointer: Int]() - - private func synchronizationError(_ message: String) { - #if FATAL_SYNCHRONIZATION - rxFatalError(message) - #else - print(message) - #endif - } - - func register(synchronizationErrorMessage: SynchronizationErrorMessages) { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - let count = (self._threads[pointer] ?? 0) + 1 - - if count > 1 { - self.synchronizationError( - "⚠️ Reentrancy anomaly was detected.\n" + - " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + - " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + - " This behavior breaks the grammar because there is overlapping between sequence events.\n" + - " Observable sequence is trying to send an event before sending of previous event has finished.\n" + - " > Interpretation: This could mean that there is some kind of unexpected cyclic dependency in your code,\n" + - " or that the system is not behaving in the expected way.\n" + - " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + - " or by enqueuing sequence events in some other way.\n" - ) - } - - self._threads[pointer] = count - - if self._threads.count > 1 { - self.synchronizationError( - "⚠️ Synchronization anomaly was detected.\n" + - " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + - " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + - " This behavior breaks the grammar because there is overlapping between sequence events.\n" + - " Observable sequence is trying to send an event before sending of previous event has finished.\n" + - " > Interpretation: " + synchronizationErrorMessage.rawValue + - " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + - " or by synchronizing sequence events in some other way.\n" - ) - } - } - - func unregister() { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - self._threads[pointer] = (self._threads[pointer] ?? 1) - 1 - if self._threads[pointer] == 0 { - self._threads[pointer] = nil - } - } - } - -#endif - -/// RxSwift global hooks -public enum Hooks { - - // Should capture call stack - public static var recordCallStackOnError: Bool = false - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift deleted file mode 100644 index 7f3c333baa6..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// RxMutableBox.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Creates mutable reference wrapper for any type. -final class RxMutableBox : CustomDebugStringConvertible { - /// Wrapped value - var value : T - - /// Creates reference wrapper for `value`. - /// - /// - parameter value: Value to wrap. - init (_ value: T) { - self.value = value - } -} - -extension RxMutableBox { - /// - returns: Box description. - var debugDescription: String { - return "MutatingBox(\(self.value))" - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift deleted file mode 100644 index e09c499de26..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// SchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.TimeInterval -import struct Foundation.Date - -// Type that represents time interval in the context of RxSwift. -public typealias RxTimeInterval = TimeInterval - -/// Type that represents absolute time in the context of RxSwift. -public typealias RxTime = Date - -/// Represents an object that schedules units of work. -public protocol SchedulerType: ImmediateSchedulerType { - - /// - returns: Current time. - var now : RxTime { - get - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable -} - -extension SchedulerType { - - /** - Periodic task will be emulated using recursive scheduling. - - - parameter state: Initial state passed to the action upon the first iteration. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - returns: The disposable object used to cancel the scheduled recurring action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let schedule = SchedulePeriodicRecursive(scheduler: self, startAfter: startAfter, period: period, action: action, state: state) - - return schedule.start() - } - - func scheduleRecursive(_ state: State, dueTime: RxTimeInterval, action: @escaping (State, AnyRecursiveScheduler) -> Void) -> Disposable { - let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) - - scheduler.schedule(state, dueTime: dueTime) - - return Disposables.create(with: scheduler.dispose) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift deleted file mode 100644 index ed2efbb16b5..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// ConcurrentDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import struct Foundation.TimeInterval -import Dispatch - -/// Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. -/// -/// This scheduler is suitable when some work needs to be performed in background. -public class ConcurrentDispatchQueueScheduler: SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - public var now : Date { - return Date() - } - - let configuration: DispatchQueueConfiguration - - /// Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. - /// - /// - parameter queue: Target dispatch queue. - /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) - } - - /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. - /// - /// - parameter qos: Target global dispatch queue, by quality of service class. - /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - @available(iOS 8, OSX 10.10, *) - public convenience init(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.init(queue: DispatchQueue( - label: "rxswift.queue.\(qos)", - qos: qos, - attributes: [DispatchQueue.Attributes.concurrent], - target: nil), - leeway: leeway - ) - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift deleted file mode 100644 index 0d65b6cabd2..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// ConcurrentMainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import struct Foundation.TimeInterval -import Dispatch - -/** -Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. - -This scheduler is optimized for `subscribeOn` operator. If you want to observe observable sequence elements on main thread using `observeOn` operator, -`MainScheduler` is more suitable for that purpose. -*/ -public final class ConcurrentMainScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - private let _mainScheduler: MainScheduler - private let _mainQueue: DispatchQueue - - /// - returns: Current time. - public var now: Date { - return self._mainScheduler.now as Date - } - - private init(mainScheduler: MainScheduler) { - self._mainQueue = DispatchQueue.main - self._mainScheduler = mainScheduler - } - - /// Singleton instance of `ConcurrentMainScheduler` - public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - if DispatchQueue.isMain { - return action(state) - } - - let cancel = SingleAssignmentDisposable() - - self._mainQueue.async { - if cancel.isDisposed { - return - } - - cancel.setDisposable(action(state)) - } - - return cancel - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self._mainScheduler.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self._mainScheduler.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift deleted file mode 100644 index c7f6b1730cc..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ /dev/null @@ -1,144 +0,0 @@ -// -// CurrentThreadScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSObject -import protocol Foundation.NSCopying -import class Foundation.Thread -import Dispatch - -#if os(Linux) - import struct Foundation.pthread_key_t - import func Foundation.pthread_setspecific - import func Foundation.pthread_getspecific - import func Foundation.pthread_key_create - - fileprivate enum CurrentThreadSchedulerQueueKey { - fileprivate static let instance = "RxSwift.CurrentThreadScheduler.Queue" - } -#else - private class CurrentThreadSchedulerQueueKey: NSObject, NSCopying { - static let instance = CurrentThreadSchedulerQueueKey() - private override init() { - super.init() - } - - override var hash: Int { - return 0 - } - - public func copy(with zone: NSZone? = nil) -> Any { - return self - } - } -#endif - -/// Represents an object that schedules units of work on the current thread. -/// -/// This is the default scheduler for operators that generate elements. -/// -/// This scheduler is also sometimes called `trampoline scheduler`. -public class CurrentThreadScheduler : ImmediateSchedulerType { - typealias ScheduleQueue = RxMutableBox> - - /// The singleton instance of the current thread scheduler. - public static let instance = CurrentThreadScheduler() - - private static var isScheduleRequiredKey: pthread_key_t = { () -> pthread_key_t in - let key = UnsafeMutablePointer.allocate(capacity: 1) - defer { -#if swift(>=4.1) - key.deallocate() -#else - key.deallocate(capacity: 1) -#endif - } - - guard pthread_key_create(key, nil) == 0 else { - rxFatalError("isScheduleRequired key creation failed") - } - - return key.pointee - }() - - private static var scheduleInProgressSentinel: UnsafeRawPointer = { () -> UnsafeRawPointer in - return UnsafeRawPointer(UnsafeMutablePointer.allocate(capacity: 1)) - }() - - static var queue : ScheduleQueue? { - get { - return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKey.instance) - } - set { - Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKey.instance) - } - } - - /// Gets a value that indicates whether the caller must call a `schedule` method. - public static fileprivate(set) var isScheduleRequired: Bool { - get { - return pthread_getspecific(CurrentThreadScheduler.isScheduleRequiredKey) == nil - } - set(isScheduleRequired) { - if pthread_setspecific(CurrentThreadScheduler.isScheduleRequiredKey, isScheduleRequired ? nil : scheduleInProgressSentinel) != 0 { - rxFatalError("pthread_setspecific failed") - } - } - } - - /** - Schedules an action to be executed as soon as possible on current thread. - - If this method is called on some thread that doesn't have `CurrentThreadScheduler` installed, scheduler will be - automatically installed and uninstalled after all work is performed. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - if CurrentThreadScheduler.isScheduleRequired { - CurrentThreadScheduler.isScheduleRequired = false - - let disposable = action(state) - - defer { - CurrentThreadScheduler.isScheduleRequired = true - CurrentThreadScheduler.queue = nil - } - - guard let queue = CurrentThreadScheduler.queue else { - return disposable - } - - while let latest = queue.value.dequeue() { - if latest.isDisposed { - continue - } - latest.invoke() - } - - return disposable - } - - let existingQueue = CurrentThreadScheduler.queue - - let queue: RxMutableBox> - if let existingQueue = existingQueue { - queue = existingQueue - } - else { - queue = RxMutableBox(Queue(capacity: 1)) - CurrentThreadScheduler.queue = queue - } - - let scheduledItem = ScheduledItem(action: action, state: state) - queue.value.enqueue(scheduledItem) - - return scheduledItem - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift deleted file mode 100644 index 11af238a3b1..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// HistoricalScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -/// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. -public class HistoricalScheduler : VirtualTimeScheduler { - - /** - Creates a new historical scheduler with initial clock value. - - - parameter initialClock: Initial value for virtual clock. - */ - public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) { - super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter()) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift deleted file mode 100644 index 930ca37762b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// HistoricalSchedulerTimeConverter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -/// Converts historical virtual time into real time. -/// -/// Since historical virtual time is also measured in `Date`, this converter is identity function. -public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - public typealias VirtualTimeUnit = RxTime - - /// Virtual time unit used to represent differences of virtual times. - public typealias VirtualTimeIntervalUnit = RxTimeInterval - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime { - return virtualTime - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit { - return time - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval { - return virtualTimeInterval - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit { - return timeInterval - } - - /** - Offsets `Date` by time interval. - - - parameter time: Time. - - parameter timeInterval: Time interval offset. - - returns: Time offsetted by time interval. - */ - public func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit { - return time.addingTimeInterval(offset) - } - - /// Compares two `Date`s. - public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { - switch lhs.compare(rhs as Date) { - case .orderedAscending: - return .lessThan - case .orderedSame: - return .equal - case .orderedDescending: - return .greaterThan - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift deleted file mode 100644 index 792a0be29e3..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// DispatchQueueConfiguration.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/23/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch -import struct Foundation.TimeInterval - -struct DispatchQueueConfiguration { - let queue: DispatchQueue - let leeway: DispatchTimeInterval -} - -private func dispatchInterval(_ interval: Foundation.TimeInterval) -> DispatchTimeInterval { - precondition(interval >= 0.0) - // TODO: Replace 1000 with something that actually works - // NSEC_PER_MSEC returns 1000000 - return DispatchTimeInterval.milliseconds(Int(interval * 1000.0)) -} - -extension DispatchQueueConfiguration { - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - self.queue.async { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - return cancel - } - - func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let deadline = DispatchTime.now() + dispatchInterval(dueTime) - - let compositeDisposable = CompositeDisposable() - - let timer = DispatchSource.makeTimerSource(queue: self.queue) - timer.schedule(deadline: deadline, leeway: self.leeway) - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if compositeDisposable.isDisposed { - return - } - _ = compositeDisposable.insert(action(state)) - cancelTimer.dispose() - }) - timer.resume() - - _ = compositeDisposable.insert(cancelTimer) - - return compositeDisposable - } - - func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let initial = DispatchTime.now() + dispatchInterval(startAfter) - - var timerState = state - - let timer = DispatchSource.makeTimerSource(queue: self.queue) - timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: self.leeway) - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if cancelTimer.isDisposed { - return - } - timerState = action(timerState) - }) - timer.resume() - - return cancelTimer - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift deleted file mode 100644 index f31469e0065..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// InvocableScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct InvocableScheduledItem : InvocableType { - - let _invocable: I - let _state: I.Value - - init(invocable: I, state: I.Value) { - self._invocable = invocable - self._state = state - } - - func invoke() { - self._invocable.invoke(self._state) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift deleted file mode 100644 index 0dba4336a74..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// InvocableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol InvocableType { - func invoke() -} - -protocol InvocableWithValueType { - associatedtype Value - - func invoke(_ value: Value) -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift deleted file mode 100644 index 6e7a0c1a86c..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct ScheduledItem - : ScheduledItemType - , InvocableType { - typealias Action = (T) -> Disposable - - private let _action: Action - private let _state: T - - private let _disposable = SingleAssignmentDisposable() - - var isDisposed: Bool { - return self._disposable.isDisposed - } - - init(action: @escaping Action, state: T) { - self._action = action - self._state = state - } - - func invoke() { - self._disposable.setDisposable(self._action(self._state)) - } - - func dispose() { - self._disposable.dispose() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift deleted file mode 100644 index d2b16cab700..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ScheduledItemType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ScheduledItemType - : Cancelable - , InvocableType { - func invoke() -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift deleted file mode 100644 index 8fb09071d5c..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// MainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Dispatch -#if !os(Linux) - import Foundation -#endif - -/** -Abstracts work that needs to be performed on `DispatchQueue.main`. In case `schedule` methods are called from `DispatchQueue.main`, it will perform action immediately without scheduling. - -This scheduler is usually used to perform UI work. - -Main scheduler is a specialization of `SerialDispatchQueueScheduler`. - -This scheduler is optimized for `observeOn` operator. To ensure observable sequence is subscribed on main thread using `subscribeOn` -operator please use `ConcurrentMainScheduler` because it is more optimized for that purpose. -*/ -public final class MainScheduler : SerialDispatchQueueScheduler { - - private let _mainQueue: DispatchQueue - - let numberEnqueued = AtomicInt(0) - - /// Initializes new instance of `MainScheduler`. - public init() { - self._mainQueue = DispatchQueue.main - super.init(serialQueue: self._mainQueue) - } - - /// Singleton instance of `MainScheduler` - public static let instance = MainScheduler() - - /// Singleton instance of `MainScheduler` that always schedules work asynchronously - /// and doesn't perform optimizations for calls scheduled from main queue. - public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: DispatchQueue.main) - - /// In case this method is called on a background thread it will throw an exception. - public class func ensureExecutingOnScheduler(errorMessage: String? = nil) { - if !DispatchQueue.isMain { - rxFatalError(errorMessage ?? "Executing on background thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") - } - } - - /// In case this method is running on a background thread it will throw an exception. - public class func ensureRunningOnMainThread(errorMessage: String? = nil) { - #if !os(Linux) // isMainThread is not implemented in Linux Foundation - guard Thread.isMainThread else { - rxFatalError(errorMessage ?? "Running on background thread.") - } - #endif - } - - override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let previousNumberEnqueued = increment(self.numberEnqueued) - - if DispatchQueue.isMain && previousNumberEnqueued == 0 { - let disposable = action(state) - decrement(self.numberEnqueued) - return disposable - } - - let cancel = SingleAssignmentDisposable() - - self._mainQueue.async { - if !cancel.isDisposed { - _ = action(state) - } - - decrement(self.numberEnqueued) - } - - return cancel - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift deleted file mode 100644 index 81ba59f34e4..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// OperationQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.Operation -import class Foundation.OperationQueue -import class Foundation.BlockOperation -import Dispatch - -/// Abstracts the work that needs to be performed on a specific `NSOperationQueue`. -/// -/// This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. -public class OperationQueueScheduler: ImmediateSchedulerType { - public let operationQueue: OperationQueue - public let queuePriority: Operation.QueuePriority - - /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. - /// - /// - parameter operationQueue: Operation queue targeted to perform work on. - /// - parameter queuePriority: Queue priority which will be assigned to new operations. - public init(operationQueue: OperationQueue, queuePriority: Operation.QueuePriority = .normal) { - self.operationQueue = operationQueue - self.queuePriority = queuePriority - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - let operation = BlockOperation { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - operation.queuePriority = self.queuePriority - - self.operationQueue.addOperation(operation) - - return cancel - } - -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift deleted file mode 100644 index 9e9b4ffd11b..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ /dev/null @@ -1,220 +0,0 @@ -// -// RecursiveScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -private enum ScheduleState { - case initial - case added(CompositeDisposable.DisposeKey) - case done -} - -/// Type erased recursive scheduler. -final class AnyRecursiveScheduler { - - typealias Action = (State, AnyRecursiveScheduler) -> Void - - private let _lock = RecursiveLock() - - // state - private let _group = CompositeDisposable() - - private var _scheduler: SchedulerType - private var _action: Action? - - init(scheduler: SchedulerType, action: @escaping Action) { - self._action = action - self._scheduler = scheduler - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the recursive action. - */ - func schedule(_ state: State, dueTime: RxTimeInterval) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.scheduleRelative(state, dueTime: dueTime) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.schedule(state) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - func dispose() { - self._lock.performLocked { - self._action = nil - } - self._group.dispose() - } -} - -/// Type erased recursive scheduler. -final class RecursiveImmediateScheduler { - typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void - - private var _lock = SpinLock() - private let _group = CompositeDisposable() - - private var _action: Action? - private let _scheduler: ImmediateSchedulerType - - init(action: @escaping Action, scheduler: ImmediateSchedulerType) { - self._action = action - self._scheduler = scheduler - } - - // immediate scheduling - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.schedule(state) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self.schedule) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - func dispose() { - self._lock.performLocked { - self._action = nil - } - self._group.dispose() - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift deleted file mode 100644 index 5b7b840b74e..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// SchedulerServices+Emulation.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum SchedulePeriodicRecursiveCommand { - case tick - case dispatchStart -} - -final class SchedulePeriodicRecursive { - typealias RecursiveAction = (State) -> State - typealias RecursiveScheduler = AnyRecursiveScheduler - - private let _scheduler: SchedulerType - private let _startAfter: RxTimeInterval - private let _period: RxTimeInterval - private let _action: RecursiveAction - - private var _state: State - private let _pendingTickCount = AtomicInt(0) - - init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { - self._scheduler = scheduler - self._startAfter = startAfter - self._period = period - self._action = action - self._state = state - } - - func start() -> Disposable { - return self._scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.tick, dueTime: self._startAfter, action: self.tick) - } - - func tick(_ command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) { - // Tries to emulate periodic scheduling as best as possible. - // The problem that could arise is if handling periodic ticks take too long, or - // tick interval is short. - switch command { - case .tick: - scheduler.schedule(.tick, dueTime: self._period) - - // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediately. - // Else work will be scheduled after previous enqueued work completes. - if increment(self._pendingTickCount) == 0 { - self.tick(.dispatchStart, scheduler: scheduler) - } - - case .dispatchStart: - self._state = self._action(self._state) - // Start work and schedule check is this last batch of work - if decrement(self._pendingTickCount) > 1 { - // This gives priority to scheduler emulation, it's not perfect, but helps - scheduler.schedule(SchedulePeriodicRecursiveCommand.dispatchStart) - } - } - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift deleted file mode 100644 index 8adb57b309f..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// SerialDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.TimeInterval -import struct Foundation.Date -import Dispatch - -/** -Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. It will make sure -that even if concurrent dispatch queue is passed, it's transformed into a serial one. - -It is extremely important that this scheduler is serial, because -certain operator perform optimizations that rely on that property. - -Because there is no way of detecting is passed dispatch queue serial or -concurrent, for every queue that is being passed, worst case (concurrent) -will be assumed, and internal serial proxy dispatch queue will be created. - -This scheduler can also be used with internal serial queue alone. - -In case some customization need to be made on it before usage, -internal serial queue can be customized using `serialQueueConfiguration` -callback. -*/ -public class SerialDispatchQueueScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - /// - returns: Current time. - public var now : Date { - return Date() - } - - let configuration: DispatchQueueConfiguration - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps `serialQueue`. - - - parameter serialQueue: Target dispatch queue. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - init(serialQueue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` with internal serial queue named `internalSerialQueueName`. - - Additional dispatch queue properties can be set after dispatch queue is created using `serialQueueConfiguration`. - - - parameter internalSerialQueueName: Name of internal serial dispatch queue. - - parameter serialQueueConfiguration: Additional configuration of internal serial dispatch queue. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - public convenience init(internalSerialQueueName: String, serialQueueConfiguration: ((DispatchQueue) -> Void)? = nil, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - let queue = DispatchQueue(label: internalSerialQueueName, attributes: []) - serialQueueConfiguration?(queue) - self.init(serialQueue: queue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` named `internalSerialQueueName` that wraps `queue`. - - - parameter queue: Possibly concurrent dispatch queue used to perform work. - - parameter internalSerialQueueName: Name of internal serial dispatch queue proxy. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - public convenience init(queue: DispatchQueue, internalSerialQueueName: String, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - // Swift 3.0 IUO - let serialQueue = DispatchQueue(label: internalSerialQueueName, - attributes: [], - target: queue) - self.init(serialQueue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - - parameter qos: Identifier for global dispatch queue with specified quality of service class. - - parameter internalSerialQueueName: Custom name for internal serial dispatch queue proxy. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - @available(iOS 8, OSX 10.10, *) - public convenience init(qos: DispatchQoS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.init(queue: DispatchQueue.global(qos: qos.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleInternal(state, action: action) - } - - func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift deleted file mode 100644 index a17475ab86d..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// VirtualTimeConverterType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Parametrization for virtual time used by `VirtualTimeScheduler`s. -public protocol VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - associatedtype VirtualTimeUnit - - /// Virtual time unit used to represent differences of virtual times. - associatedtype VirtualTimeIntervalUnit - - /** - Converts virtual time to real time. - - - parameter virtualTime: Virtual time to convert to `Date`. - - returns: `Date` corresponding to virtual time. - */ - func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime - - /** - Converts real time to virtual time. - - - parameter time: `Date` to convert to virtual time. - - returns: Virtual time corresponding to `Date`. - */ - func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit - - /** - Converts from virtual time interval to `NSTimeInterval`. - - - parameter virtualTimeInterval: Virtual time interval to convert to `NSTimeInterval`. - - returns: `NSTimeInterval` corresponding to virtual time interval. - */ - func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval - - /** - Converts from `NSTimeInterval` to virtual time interval. - - - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - - returns: Virtual time interval corresponding to time interval. - */ - func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit - - /** - Offsets virtual time by virtual time interval. - - - parameter time: Virtual time. - - parameter offset: Virtual time interval. - - returns: Time corresponding to time offsetted by virtual time interval. - */ - func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit - - /** - This is additional abstraction because `Date` is unfortunately not comparable. - Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. - */ - func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison -} - -/** - Virtual time comparison result. - - This is additional abstraction because `Date` is unfortunately not comparable. - Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. -*/ -public enum VirtualTimeComparison { - /// lhs < rhs. - case lessThan - /// lhs == rhs. - case equal - /// lhs > rhs. - case greaterThan -} - -extension VirtualTimeComparison { - /// lhs < rhs. - var lessThen: Bool { - return self == .lessThan - } - - /// lhs > rhs - var greaterThan: Bool { - return self == .greaterThan - } - - /// lhs == rhs - var equal: Bool { - return self == .equal - } -} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift deleted file mode 100644 index 037df95a047..00000000000 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ /dev/null @@ -1,269 +0,0 @@ -// -// VirtualTimeScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for virtual time schedulers using a priority queue for scheduled items. -open class VirtualTimeScheduler - : SchedulerType { - - public typealias VirtualTime = Converter.VirtualTimeUnit - public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - - private var _running : Bool - - private var _clock: VirtualTime - - fileprivate var _schedulerQueue : PriorityQueue> - private var _converter: Converter - - private var _nextId = 0 - - /// - returns: Current time. - public var now: RxTime { - return self._converter.convertFromVirtualTime(self.clock) - } - - /// - returns: Scheduler's absolute time clock value. - public var clock: VirtualTime { - return self._clock - } - - /// Creates a new virtual time scheduler. - /// - /// - parameter initialClock: Initial value for the clock. - public init(initialClock: VirtualTime, converter: Converter) { - self._clock = initialClock - self._running = false - self._converter = converter - self._schedulerQueue = PriorityQueue(hasHigherPriority: { - switch converter.compareVirtualTime($0.time, $1.time) { - case .lessThan: - return true - case .equal: - return $0.id < $1.id - case .greaterThan: - return false - } - }, isEqual: { $0 === $1 }) - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleRelative(state, dueTime: 0.0) { a in - return action(a) - } - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self.now.addingTimeInterval(dueTime) - let absoluteTime = self._converter.convertToVirtualTime(time) - let adjustedTime = self.adjustScheduledTime(absoluteTime) - return self.scheduleAbsoluteVirtual(state, time: adjustedTime, action: action) - } - - /** - Schedules an action to be executed after relative time has passed. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. If this is less or equal then `now`, `now + 1` will be used. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelativeVirtual(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self._converter.offsetVirtualTime(self.clock, offset: dueTime) - return self.scheduleAbsoluteVirtual(state, time: time, action: action) - } - - /** - Schedules an action to be executed at absolute virtual time. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleAbsoluteVirtual(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - - let compositeDisposable = CompositeDisposable() - - let item = VirtualSchedulerItem(action: { - let dispose = action(state) - return dispose - }, time: time, id: self._nextId) - - self._nextId += 1 - - self._schedulerQueue.enqueue(item) - - _ = compositeDisposable.insert(item) - - return compositeDisposable - } - - /// Adjusts time of scheduling before adding item to schedule queue. - open func adjustScheduledTime(_ time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit { - return time - } - - /// Starts the virtual time scheduler. - public func start() { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - return - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._running = false - } - - func findNext() -> VirtualSchedulerItem? { - while let front = self._schedulerQueue.peek() { - if front.isDisposed { - self._schedulerQueue.remove(front) - continue - } - - return front - } - - return nil - } - - /// Advances the scheduler's clock to the specified time, running all work till that point. - /// - /// - parameter virtualTime: Absolute time to advance the scheduler's clock to. - public func advanceTo(_ virtualTime: VirtualTime) { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - fatalError("Scheduler is already running") - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, virtualTime).greaterThan { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._clock = virtualTime - self._running = false - } - - /// Advances the scheduler's clock by the specified relative time. - public func sleep(_ virtualInterval: VirtualTimeInterval) { - MainScheduler.ensureExecutingOnScheduler() - - let sleepTo = self._converter.offsetVirtualTime(self.clock, offset: virtualInterval) - if self._converter.compareVirtualTime(sleepTo, self.clock).lessThen { - fatalError("Can't sleep to past.") - } - - self._clock = sleepTo - } - - /// Stops the virtual time scheduler. - public func stop() { - MainScheduler.ensureExecutingOnScheduler() - - self._running = false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// MARK: description - -extension VirtualTimeScheduler: CustomDebugStringConvertible { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - return self._schedulerQueue.debugDescription - } -} - -final class VirtualSchedulerItem