forked from loafle/openapi-generator-original
update clojure petstore with OAS2 (#117)
This commit is contained in:
parent
5e05638360
commit
f79f23865b
@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
@ -3,30 +3,27 @@
|
|||||||
(:import (java.io File)))
|
(:import (java.io File)))
|
||||||
|
|
||||||
(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"
|
||||||
"
|
|
||||||
([] (add-pet-with-http-info nil))
|
([] (add-pet-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [pet ]}]
|
||||||
(call-api "/pet" :post
|
(call-api "/pet" :post
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param pet
|
||||||
:content-types ["application/json" "application/xml"]
|
:content-types ["application/json" "application/xml"]
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn add-pet
|
(defn add-pet
|
||||||
"Add a new pet to the store
|
"Add a new pet to the store"
|
||||||
"
|
|
||||||
([] (add-pet nil))
|
([] (add-pet nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (add-pet-with-http-info 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"
|
||||||
"
|
|
||||||
([pet-id ] (delete-pet-with-http-info pet-id nil))
|
([pet-id ] (delete-pet-with-http-info pet-id nil))
|
||||||
([pet-id {:keys [api-key ]}]
|
([pet-id {:keys [api-key ]}]
|
||||||
(check-required-params pet-id)
|
(check-required-params pet-id)
|
||||||
@ -36,12 +33,11 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn delete-pet
|
(defn delete-pet
|
||||||
"Deletes a pet
|
"Deletes a pet"
|
||||||
"
|
|
||||||
([pet-id ] (delete-pet pet-id nil))
|
([pet-id ] (delete-pet pet-id nil))
|
||||||
([pet-id optional-params]
|
([pet-id optional-params]
|
||||||
(:data (delete-pet-with-http-info pet-id optional-params))))
|
(:data (delete-pet-with-http-info pet-id optional-params))))
|
||||||
@ -54,7 +50,7 @@
|
|||||||
(call-api "/pet/findByStatus" :get
|
(call-api "/pet/findByStatus" :get
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {"status" (with-collection-format status :multi) }
|
:query-params {"status" status }
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts ["application/json" "application/xml"]
|
||||||
@ -75,7 +71,7 @@
|
|||||||
(call-api "/pet/findByTags" :get
|
(call-api "/pet/findByTags" :get
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {"tags" (with-collection-format tags :multi) }
|
:query-params {"tags" tags }
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts ["application/json" "application/xml"]
|
||||||
@ -109,30 +105,27 @@
|
|||||||
(: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"
|
||||||
"
|
|
||||||
([] (update-pet-with-http-info nil))
|
([] (update-pet-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [pet ]}]
|
||||||
(call-api "/pet" :put
|
(call-api "/pet" :put
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param pet
|
||||||
:content-types ["application/json" "application/xml"]
|
:content-types ["application/json" "application/xml"]
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn update-pet
|
(defn update-pet
|
||||||
"Update an existing pet
|
"Update an existing pet"
|
||||||
"
|
|
||||||
([] (update-pet nil))
|
([] (update-pet nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (update-pet-with-http-info 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"
|
||||||
"
|
|
||||||
([pet-id ] (update-pet-with-form-with-http-info pet-id nil))
|
([pet-id ] (update-pet-with-form-with-http-info pet-id nil))
|
||||||
([pet-id {:keys [name status ]}]
|
([pet-id {:keys [name status ]}]
|
||||||
(check-required-params pet-id)
|
(check-required-params pet-id)
|
||||||
@ -142,19 +135,17 @@
|
|||||||
: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/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn update-pet-with-form
|
(defn update-pet-with-form
|
||||||
"Updates a pet in the store with form data
|
"Updates a pet in the store with form data"
|
||||||
"
|
|
||||||
([pet-id ] (update-pet-with-form pet-id nil))
|
([pet-id ] (update-pet-with-form pet-id nil))
|
||||||
([pet-id optional-params]
|
([pet-id optional-params]
|
||||||
(:data (update-pet-with-form-with-http-info pet-id optional-params))))
|
(:data (update-pet-with-form-with-http-info pet-id optional-params))))
|
||||||
|
|
||||||
(defn upload-file-with-http-info
|
(defn upload-file-with-http-info
|
||||||
"uploads an image
|
"uploads an image"
|
||||||
"
|
|
||||||
([pet-id ] (upload-file-with-http-info pet-id nil))
|
([pet-id ] (upload-file-with-http-info pet-id nil))
|
||||||
([pet-id {:keys [additional-metadata ^File file ]}]
|
([pet-id {:keys [additional-metadata ^File file ]}]
|
||||||
(check-required-params pet-id)
|
(check-required-params pet-id)
|
||||||
@ -164,12 +155,11 @@
|
|||||||
: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" "application/xml"]
|
:accepts []
|
||||||
:auth-names ["petstore_auth"]})))
|
:auth-names ["petstore_auth"]})))
|
||||||
|
|
||||||
(defn upload-file
|
(defn upload-file
|
||||||
"uploads an image
|
"uploads an image"
|
||||||
"
|
|
||||||
([pet-id ] (upload-file pet-id nil))
|
([pet-id ] (upload-file pet-id nil))
|
||||||
([pet-id optional-params]
|
([pet-id optional-params]
|
||||||
(:data (upload-file-with-http-info pet-id optional-params))))
|
(:data (upload-file-with-http-info pet-id optional-params))))
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn delete-order
|
(defn delete-order
|
||||||
@ -62,23 +62,21 @@
|
|||||||
(:data (get-order-by-id-with-http-info order-id)))
|
(:data (get-order-by-id-with-http-info order-id)))
|
||||||
|
|
||||||
(defn place-order-with-http-info
|
(defn place-order-with-http-info
|
||||||
"Place an order for a pet
|
"Place an order for a pet"
|
||||||
"
|
|
||||||
([] (place-order-with-http-info nil))
|
([] (place-order-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [order ]}]
|
||||||
(call-api "/store/order" :post
|
(call-api "/store/order" :post
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param order
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts ["application/json" "application/xml"]
|
||||||
:auth-names []})))
|
:auth-names []})))
|
||||||
|
|
||||||
(defn place-order
|
(defn place-order
|
||||||
"Place an order for a pet
|
"Place an order for a pet"
|
||||||
"
|
|
||||||
([] (place-order nil))
|
([] (place-order nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (place-order-with-http-info optional-params))))
|
(:data (place-order-with-http-info optional-params))))
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
"Create user
|
"Create user
|
||||||
This can only be done by the logged in user."
|
This can only be done by the logged in user."
|
||||||
([] (create-user-with-http-info nil))
|
([] (create-user-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [user ]}]
|
||||||
(call-api "/user" :post
|
(call-api "/user" :post
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param user
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []})))
|
:auth-names []})))
|
||||||
|
|
||||||
(defn create-user
|
(defn create-user
|
||||||
@ -25,45 +25,41 @@
|
|||||||
(:data (create-user-with-http-info 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"
|
||||||
"
|
|
||||||
([] (create-users-with-array-input-with-http-info nil))
|
([] (create-users-with-array-input-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [user ]}]
|
||||||
(call-api "/user/createWithArray" :post
|
(call-api "/user/createWithArray" :post
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param user
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []})))
|
: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"
|
||||||
"
|
|
||||||
([] (create-users-with-array-input nil))
|
([] (create-users-with-array-input nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (create-users-with-array-input-with-http-info 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"
|
||||||
"
|
|
||||||
([] (create-users-with-list-input-with-http-info nil))
|
([] (create-users-with-list-input-with-http-info nil))
|
||||||
([{:keys [body ]}]
|
([{:keys [user ]}]
|
||||||
(call-api "/user/createWithList" :post
|
(call-api "/user/createWithList" :post
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param user
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []})))
|
: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"
|
||||||
"
|
|
||||||
([] (create-users-with-list-input nil))
|
([] (create-users-with-list-input nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (create-users-with-list-input-with-http-info optional-params))))
|
(:data (create-users-with-list-input-with-http-info optional-params))))
|
||||||
@ -79,7 +75,7 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn delete-user
|
(defn delete-user
|
||||||
@ -89,8 +85,7 @@
|
|||||||
(:data (delete-user-with-http-info username)))
|
(:data (delete-user-with-http-info username)))
|
||||||
|
|
||||||
(defn get-user-by-name-with-http-info
|
(defn get-user-by-name-with-http-info
|
||||||
"Get user by user name
|
"Get user by user name"
|
||||||
"
|
|
||||||
[username ]
|
[username ]
|
||||||
(check-required-params username)
|
(check-required-params username)
|
||||||
(call-api "/user/{username}" :get
|
(call-api "/user/{username}" :get
|
||||||
@ -103,14 +98,12 @@
|
|||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn get-user-by-name
|
(defn get-user-by-name
|
||||||
"Get user by user name
|
"Get user by user name"
|
||||||
"
|
|
||||||
[username ]
|
[username ]
|
||||||
(:data (get-user-by-name-with-http-info username)))
|
(:data (get-user-by-name-with-http-info username)))
|
||||||
|
|
||||||
(defn login-user-with-http-info
|
(defn login-user-with-http-info
|
||||||
"Logs user into the system
|
"Logs user into the system"
|
||||||
"
|
|
||||||
([] (login-user-with-http-info nil))
|
([] (login-user-with-http-info nil))
|
||||||
([{:keys [username password ]}]
|
([{:keys [username password ]}]
|
||||||
(call-api "/user/login" :get
|
(call-api "/user/login" :get
|
||||||
@ -123,15 +116,13 @@
|
|||||||
:auth-names []})))
|
:auth-names []})))
|
||||||
|
|
||||||
(defn login-user
|
(defn login-user
|
||||||
"Logs user into the system
|
"Logs user into the system"
|
||||||
"
|
|
||||||
([] (login-user nil))
|
([] (login-user nil))
|
||||||
([optional-params]
|
([optional-params]
|
||||||
(:data (login-user-with-http-info 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"
|
||||||
"
|
|
||||||
[]
|
[]
|
||||||
(call-api "/user/logout" :get
|
(call-api "/user/logout" :get
|
||||||
{:path-params {}
|
{:path-params {}
|
||||||
@ -139,12 +130,11 @@
|
|||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []}))
|
:auth-names []}))
|
||||||
|
|
||||||
(defn logout-user
|
(defn logout-user
|
||||||
"Logs out current logged in user session
|
"Logs out current logged in user session"
|
||||||
"
|
|
||||||
[]
|
[]
|
||||||
(:data (logout-user-with-http-info)))
|
(:data (logout-user-with-http-info)))
|
||||||
|
|
||||||
@ -152,16 +142,16 @@
|
|||||||
"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 ] (update-user-with-http-info username nil))
|
([username ] (update-user-with-http-info username nil))
|
||||||
([username {:keys [body ]}]
|
([username {:keys [user ]}]
|
||||||
(check-required-params username)
|
(check-required-params username)
|
||||||
(call-api "/user/{username}" :put
|
(call-api "/user/{username}" :put
|
||||||
{:path-params {"username" username }
|
{:path-params {"username" username }
|
||||||
:header-params {}
|
:header-params {}
|
||||||
:query-params {}
|
:query-params {}
|
||||||
:form-params {}
|
:form-params {}
|
||||||
:body-param body
|
:body-param user
|
||||||
:content-types []
|
:content-types []
|
||||||
:accepts ["application/json" "application/xml"]
|
:accepts []
|
||||||
:auth-names []})))
|
:auth-names []})))
|
||||||
|
|
||||||
(defn update-user
|
(defn update-user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user