diff --git a/samples/client/petstore/clojure/.swagger-codegen-ignore b/samples/client/petstore/clojure/.swagger-codegen-ignore new file mode 100644 index 00000000000..c5fa491b4c5 --- /dev/null +++ b/samples/client/petstore/clojure/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj index 96c1cf85fc2..845aa55b526 100644 --- a/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj +++ b/samples/client/petstore/clojure/src/swagger_petstore/api/pet.clj @@ -24,28 +24,6 @@ ([optional-params] (:data (add-pet-with-http-info optional-params)))) -(defn add-pet-using-byte-array-with-http-info - "Fake endpoint to test byte array in body parameter for adding a new pet to the store - " - ([] (add-pet-using-byte-array-with-http-info nil)) - ([{:keys [body ]}] - (call-api "/pet?testing_byte_array=true" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {} - :body-param body - :content-types ["application/json" "application/xml"] - :accepts ["application/json" "application/xml"] - :auth-names ["petstore_auth"]}))) - -(defn add-pet-using-byte-array - "Fake endpoint to test byte array in body parameter for adding a new pet to the store - " - ([] (add-pet-using-byte-array nil)) - ([optional-params] - (:data (add-pet-using-byte-array-with-http-info optional-params)))) - (defn delete-pet-with-http-info "Deletes a pet " @@ -120,7 +98,7 @@ :form-params {} :content-types [] :accepts ["application/json" "application/xml"] - :auth-names ["api_key" "petstore_auth"]})) + :auth-names ["petstore_auth" "api_key"]})) (defn get-pet-by-id "Find pet by ID @@ -128,44 +106,6 @@ [pet-id ] (:data (get-pet-by-id-with-http-info pet-id))) -(defn get-pet-by-id-in-object-with-http-info - "Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" - [pet-id ] - (call-api "/pet/{petId}?response=inline_arbitrary_object" :get - {:path-params {"petId" pet-id } - :header-params {} - :query-params {} - :form-params {} - :content-types [] - :accepts ["application/json" "application/xml"] - :auth-names ["api_key" "petstore_auth"]})) - -(defn get-pet-by-id-in-object - "Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" - [pet-id ] - (:data (get-pet-by-id-in-object-with-http-info pet-id))) - -(defn pet-pet-idtesting-byte-arraytrue-get-with-http-info - "Fake endpoint to test byte array return by 'Find pet by ID' - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" - [pet-id ] - (call-api "/pet/{petId}?testing_byte_array=true" :get - {:path-params {"petId" pet-id } - :header-params {} - :query-params {} - :form-params {} - :content-types [] - :accepts ["application/json" "application/xml"] - :auth-names ["api_key" "petstore_auth"]})) - -(defn pet-pet-idtesting-byte-arraytrue-get - "Fake endpoint to test byte array return by 'Find pet by ID' - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" - [pet-id ] - (:data (pet-pet-idtesting-byte-arraytrue-get-with-http-info pet-id))) - (defn update-pet-with-http-info "Update an existing pet " @@ -229,3 +169,4 @@ ([pet-id ] (upload-file pet-id nil)) ([pet-id optional-params] (:data (upload-file-with-http-info pet-id optional-params)))) + diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj index 1e3cc25e4a6..04d185a8086 100644 --- a/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj +++ b/samples/client/petstore/clojure/src/swagger_petstore/api/store.clj @@ -21,27 +21,6 @@ [order-id ] (:data (delete-order-with-http-info order-id))) -(defn find-orders-by-status-with-http-info - "Finds orders by status - A single status value can be provided as a string" - ([] (find-orders-by-status-with-http-info nil)) - ([{:keys [status ]}] - (call-api "/store/findByStatus" :get - {:path-params {} - :header-params {} - :query-params {"status" status } - :form-params {} - :content-types [] - :accepts ["application/json" "application/xml"] - :auth-names ["test_api_client_id" "test_api_client_secret"]}))) - -(defn find-orders-by-status - "Finds orders by status - A single status value can be provided as a string" - ([] (find-orders-by-status nil)) - ([optional-params] - (:data (find-orders-by-status-with-http-info optional-params)))) - (defn get-inventory-with-http-info "Returns pet inventories by status Returns a map of status codes to quantities" @@ -61,25 +40,6 @@ [] (:data (get-inventory-with-http-info))) -(defn get-inventory-in-object-with-http-info - "Fake endpoint to test arbitrary object return by 'Get inventory' - Returns an arbitrary object which is actually a map of status codes to quantities" - [] - (call-api "/store/inventory?response=arbitrary_object" :get - {:path-params {} - :header-params {} - :query-params {} - :form-params {} - :content-types [] - :accepts ["application/json" "application/xml"] - :auth-names ["api_key"]})) - -(defn get-inventory-in-object - "Fake endpoint to test arbitrary object return by 'Get inventory' - Returns an arbitrary object which is actually a map of status codes to quantities" - [] - (:data (get-inventory-in-object-with-http-info))) - (defn get-order-by-id-with-http-info "Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" @@ -91,7 +51,7 @@ :form-params {} :content-types [] :accepts ["application/json" "application/xml"] - :auth-names ["test_api_key_header" "test_api_key_query"]})) + :auth-names []})) (defn get-order-by-id "Find purchase order by ID @@ -112,7 +72,7 @@ :body-param body :content-types [] :accepts ["application/json" "application/xml"] - :auth-names ["test_api_client_id" "test_api_client_secret"]}))) + :auth-names []}))) (defn place-order "Place an order for a pet @@ -120,3 +80,4 @@ ([] (place-order nil)) ([optional-params] (:data (place-order-with-http-info optional-params)))) + diff --git a/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj b/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj index 07b016d641a..26e3dffc624 100644 --- a/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj +++ b/samples/client/petstore/clojure/src/swagger_petstore/api/user.clj @@ -167,3 +167,4 @@ ([username ] (update-user username nil)) ([username optional-params] (:data (update-user-with-http-info username optional-params)))) + diff --git a/samples/client/petstore/clojure/src/swagger_petstore/core.clj b/samples/client/petstore/clojure/src/swagger_petstore/core.clj index f01f3061e0d..dc66c644aea 100644 --- a/samples/client/petstore/clojure/src/swagger_petstore/core.clj +++ b/samples/client/petstore/clojure/src/swagger_petstore/core.clj @@ -8,12 +8,8 @@ (java.text SimpleDateFormat))) (def auth-definitions - {"test_api_key_header" {:type :api-key :in :header :param-name "test_api_key_header"} - "api_key" {:type :api-key :in :header :param-name "api_key"} - "test_api_client_secret" {:type :api-key :in :header :param-name "x-test_api_client_secret"} - "test_api_client_id" {:type :api-key :in :header :param-name "x-test_api_client_id"} - "test_api_key_query" {:type :api-key :in :query :param-name "test_api_key_query"} - "petstore_auth" {:type :oauth2}}) + {"api_key" {:type :api-key :in :header :param-name "api_key"}"petstore_auth" {:type :oauth2} + }) (def default-api-context "Default API context." @@ -21,12 +17,8 @@ :date-format "yyyy-MM-dd" :datetime-format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" :debug false - :auths {"test_api_key_header" nil - "api_key" nil - "test_api_client_secret" nil - "test_api_client_id" nil - "test_api_key_query" nil - "petstore_auth" nil}}) + :auths {"api_key" nil"petstore_auth" nil + }}) (def ^:dynamic *api-context* "Dynamic API context to be applied in API calls."