forked from loafle/openapi-generator-original
update clojure petstore cient
This commit is contained in:
parent
b1ccaf69ac
commit
999f901d2b
@ -1,5 +1,5 @@
|
|||||||
(defproject swagger-petstore "1.0.0"
|
(defproject swagger-petstore "1.0.0"
|
||||||
:description "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
|
:description "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters"
|
||||||
:license {:name "Apache 2.0"
|
:license {:name "Apache 2.0"
|
||||||
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
|
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
|
||||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||||
|
@ -5,22 +5,24 @@
|
|||||||
(defn add-pet-with-http-info
|
(defn add-pet-with-http-info
|
||||||
"Add a new pet to the store
|
"Add a new pet to the store
|
||||||
"
|
"
|
||||||
[body ]
|
([] (add-pet-with-http-info nil))
|
||||||
(call-api "/pet" :post
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/pet" :post
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types ["application/json" "application/xml"]
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types ["application/json" "application/xml"]
|
||||||
:auth-names ["petstore_auth"]}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn add-pet
|
(defn add-pet
|
||||||
"Add a new pet to the store
|
"Add a new pet to the store
|
||||||
"
|
"
|
||||||
[body ]
|
([] (add-pet nil))
|
||||||
(:data (add-pet-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (add-pet-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn delete-pet-with-http-info
|
(defn delete-pet-with-http-info
|
||||||
"Deletes a pet
|
"Deletes a pet
|
||||||
@ -33,7 +35,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn delete-pet
|
(defn delete-pet
|
||||||
@ -46,44 +48,48 @@
|
|||||||
(defn find-pets-by-status-with-http-info
|
(defn find-pets-by-status-with-http-info
|
||||||
"Finds Pets by status
|
"Finds Pets by status
|
||||||
Multiple status values can be provided with comma separated strings"
|
Multiple status values can be provided with comma separated strings"
|
||||||
[status ]
|
([] (find-pets-by-status-with-http-info nil))
|
||||||
(call-api "/pet/findByStatus" :get
|
([{:keys [status ]}]
|
||||||
{:path-params {}
|
(call-api "/pet/findByStatus" :get
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {"status" (with-collection-format status :csv) }
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {"status" (with-collection-format status :multi) }
|
||||||
:content-types []
|
:form-params {}
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names ["petstore_auth"]}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn find-pets-by-status
|
(defn find-pets-by-status
|
||||||
"Finds Pets by status
|
"Finds Pets by status
|
||||||
Multiple status values can be provided with comma separated strings"
|
Multiple status values can be provided with comma separated strings"
|
||||||
[status ]
|
([] (find-pets-by-status nil))
|
||||||
(:data (find-pets-by-status-with-http-info status)))
|
([optional-params]
|
||||||
|
(:data (find-pets-by-status-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn find-pets-by-tags-with-http-info
|
(defn find-pets-by-tags-with-http-info
|
||||||
"Finds Pets by tags
|
"Finds Pets by tags
|
||||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
|
||||||
[tags ]
|
([] (find-pets-by-tags-with-http-info nil))
|
||||||
(call-api "/pet/findByTags" :get
|
([{:keys [tags ]}]
|
||||||
{:path-params {}
|
(call-api "/pet/findByTags" :get
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {"tags" (with-collection-format tags :csv) }
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {"tags" (with-collection-format tags :multi) }
|
||||||
:content-types []
|
:form-params {}
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names ["petstore_auth"]}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn find-pets-by-tags
|
(defn find-pets-by-tags
|
||||||
"Finds Pets by tags
|
"Finds Pets by tags
|
||||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
|
||||||
[tags ]
|
([] (find-pets-by-tags nil))
|
||||||
(:data (find-pets-by-tags-with-http-info tags)))
|
([optional-params]
|
||||||
|
(:data (find-pets-by-tags-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn get-pet-by-id-with-http-info
|
(defn get-pet-by-id-with-http-info
|
||||||
"Find pet by ID
|
"Find pet by ID
|
||||||
Returns a single pet"
|
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
|
||||||
[pet-id ]
|
[pet-id ]
|
||||||
(call-api "/pet/{petId}" :get
|
(call-api "/pet/{petId}" :get
|
||||||
{:path-params {"petId" pet-id }
|
{:path-params {"petId" pet-id }
|
||||||
@ -91,35 +97,36 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
|
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names ["api_key" "petstore_auth"]}))
|
:auth-names ["api_key" "petstore_auth"]}))
|
||||||
|
|
||||||
(defn get-pet-by-id
|
(defn get-pet-by-id
|
||||||
"Find pet by ID
|
"Find pet by ID
|
||||||
Returns a single pet"
|
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
|
||||||
[pet-id ]
|
[pet-id ]
|
||||||
(:data (get-pet-by-id-with-http-info pet-id)))
|
(:data (get-pet-by-id-with-http-info pet-id)))
|
||||||
|
|
||||||
(defn update-pet-with-http-info
|
(defn update-pet-with-http-info
|
||||||
"Update an existing pet
|
"Update an existing pet
|
||||||
"
|
"
|
||||||
[body ]
|
([] (update-pet-with-http-info nil))
|
||||||
(call-api "/pet" :put
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/pet" :put
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types ["application/json" "application/xml"]
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types ["application/json" "application/xml"]
|
||||||
:auth-names ["petstore_auth"]}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn update-pet
|
(defn update-pet
|
||||||
"Update an existing pet
|
"Update an existing pet
|
||||||
"
|
"
|
||||||
[body ]
|
([] (update-pet nil))
|
||||||
(:data (update-pet-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (update-pet-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn update-pet-with-form-with-http-info
|
(defn update-pet-with-form-with-http-info
|
||||||
"Updates a pet in the store with form data
|
"Updates a pet in the store with form data
|
||||||
@ -132,7 +139,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {"name" name "status" status }
|
:form-params {"name" name "status" status }
|
||||||
:content-types ["application/x-www-form-urlencoded"]
|
:content-types ["application/x-www-form-urlencoded"]
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn update-pet-with-form
|
(defn update-pet-with-form
|
||||||
@ -153,7 +160,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {"additionalMetadata" additional-metadata "file" file }
|
:form-params {"additionalMetadata" additional-metadata "file" file }
|
||||||
:content-types ["multipart/form-data"]
|
:content-types ["multipart/form-data"]
|
||||||
:accepts ["application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn upload-file
|
(defn upload-file
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn delete-order
|
(defn delete-order
|
||||||
@ -31,7 +31,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names ["api_key"]}))
|
:auth-names ["api_key"]}))
|
||||||
|
|
||||||
(defn get-inventory
|
(defn get-inventory
|
||||||
@ -50,7 +50,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn get-order-by-id
|
(defn get-order-by-id
|
||||||
@ -62,20 +62,22 @@
|
|||||||
(defn place-order-with-http-info
|
(defn place-order-with-http-info
|
||||||
"Place an order for a pet
|
"Place an order for a pet
|
||||||
"
|
"
|
||||||
[body ]
|
([] (place-order-with-http-info nil))
|
||||||
(call-api "/store/order" :post
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/store/order" :post
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types []
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn place-order
|
(defn place-order
|
||||||
"Place an order for a pet
|
"Place an order for a pet
|
||||||
"
|
"
|
||||||
[body ]
|
([] (place-order nil))
|
||||||
(:data (place-order-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (place-order-with-http-info optional-params))))
|
||||||
|
|
||||||
|
@ -5,62 +5,68 @@
|
|||||||
(defn create-user-with-http-info
|
(defn create-user-with-http-info
|
||||||
"Create user
|
"Create user
|
||||||
This can only be done by the logged in user."
|
This can only be done by the logged in user."
|
||||||
[body ]
|
([] (create-user-with-http-info nil))
|
||||||
(call-api "/user" :post
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/user" :post
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types []
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn create-user
|
(defn create-user
|
||||||
"Create user
|
"Create user
|
||||||
This can only be done by the logged in user."
|
This can only be done by the logged in user."
|
||||||
[body ]
|
([] (create-user nil))
|
||||||
(:data (create-user-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (create-user-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn create-users-with-array-input-with-http-info
|
(defn create-users-with-array-input-with-http-info
|
||||||
"Creates list of users with given input array
|
"Creates list of users with given input array
|
||||||
"
|
"
|
||||||
[body ]
|
([] (create-users-with-array-input-with-http-info nil))
|
||||||
(call-api "/user/createWithArray" :post
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/user/createWithArray" :post
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types []
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn create-users-with-array-input
|
(defn create-users-with-array-input
|
||||||
"Creates list of users with given input array
|
"Creates list of users with given input array
|
||||||
"
|
"
|
||||||
[body ]
|
([] (create-users-with-array-input nil))
|
||||||
(:data (create-users-with-array-input-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (create-users-with-array-input-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn create-users-with-list-input-with-http-info
|
(defn create-users-with-list-input-with-http-info
|
||||||
"Creates list of users with given input array
|
"Creates list of users with given input array
|
||||||
"
|
"
|
||||||
[body ]
|
([] (create-users-with-list-input-with-http-info nil))
|
||||||
(call-api "/user/createWithList" :post
|
([{:keys [body ]}]
|
||||||
{:path-params {}
|
(call-api "/user/createWithList" :post
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types []
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn create-users-with-list-input
|
(defn create-users-with-list-input
|
||||||
"Creates list of users with given input array
|
"Creates list of users with given input array
|
||||||
"
|
"
|
||||||
[body ]
|
([] (create-users-with-list-input nil))
|
||||||
(:data (create-users-with-list-input-with-http-info body)))
|
([optional-params]
|
||||||
|
(:data (create-users-with-list-input-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn delete-user-with-http-info
|
(defn delete-user-with-http-info
|
||||||
"Delete user
|
"Delete user
|
||||||
@ -72,7 +78,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn delete-user
|
(defn delete-user
|
||||||
@ -91,7 +97,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn get-user-by-name
|
(defn get-user-by-name
|
||||||
@ -103,21 +109,23 @@
|
|||||||
(defn login-user-with-http-info
|
(defn login-user-with-http-info
|
||||||
"Logs user into the system
|
"Logs user into the system
|
||||||
"
|
"
|
||||||
[username password ]
|
([] (login-user-with-http-info nil))
|
||||||
(call-api "/user/login" :get
|
([{:keys [username password ]}]
|
||||||
{:path-params {}
|
(call-api "/user/login" :get
|
||||||
:header-params {}
|
{:path-params {}
|
||||||
:query-params {"username" username "password" password }
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {"username" username "password" password }
|
||||||
:content-types []
|
:form-params {}
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn login-user
|
(defn login-user
|
||||||
"Logs user into the system
|
"Logs user into the system
|
||||||
"
|
"
|
||||||
[username password ]
|
([] (login-user nil))
|
||||||
(:data (login-user-with-http-info username password)))
|
([optional-params]
|
||||||
|
(:data (login-user-with-http-info optional-params))))
|
||||||
|
|
||||||
(defn logout-user-with-http-info
|
(defn logout-user-with-http-info
|
||||||
"Logs out current logged in user session
|
"Logs out current logged in user session
|
||||||
@ -129,7 +137,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/xml" "application/json"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn logout-user
|
(defn logout-user
|
||||||
@ -141,20 +149,22 @@
|
|||||||
(defn update-user-with-http-info
|
(defn update-user-with-http-info
|
||||||
"Updated user
|
"Updated user
|
||||||
This can only be done by the logged in user."
|
This can only be done by the logged in user."
|
||||||
[username body ]
|
([username ] (update-user-with-http-info username nil))
|
||||||
(call-api "/user/{username}" :put
|
([username {:keys [body ]}]
|
||||||
{:path-params {"username" username }
|
(call-api "/user/{username}" :put
|
||||||
:header-params {}
|
{:path-params {"username" username }
|
||||||
:query-params {}
|
:header-params {}
|
||||||
:form-params {}
|
:query-params {}
|
||||||
:body-param body
|
:form-params {}
|
||||||
:content-types []
|
:body-param body
|
||||||
:accepts ["application/xml" "application/json"]
|
:content-types []
|
||||||
:auth-names []}))
|
:accepts ["application/json" "application/xml"]
|
||||||
|
:auth-names []})))
|
||||||
|
|
||||||
(defn update-user
|
(defn update-user
|
||||||
"Updated user
|
"Updated user
|
||||||
This can only be done by the logged in user."
|
This can only be done by the logged in user."
|
||||||
[username body ]
|
([username ] (update-user username nil))
|
||||||
(:data (update-user-with-http-info username body)))
|
([username optional-params]
|
||||||
|
(:data (update-user-with-http-info username optional-params))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user