diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java
index 9c64b235a62..f9c360845dd 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java
@@ -321,7 +321,6 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
@Override
public String toVarName(String name) {
name = name.replaceAll("[^a-zA-Z0-9_-]+", ""); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
- name = org.openapitools.codegen.utils.StringUtils.dashize(name);
return name;
}
diff --git a/pom.xml b/pom.xml
index 05b212826fb..ff4b22bb01a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1161,7 +1161,6 @@
samples/client/petstore/scala-akka
samples/client/petstore/scala-httpclient
samples/client/petstore/scalaz
- samples/client/petstore/clojure
samples/client/petstore/java/feign
samples/client/petstore/java/jersey1
samples/client/petstore/java/jersey2
diff --git a/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj b/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj
index ff8ff4da100..4dc96302b70 100644
--- a/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj
+++ b/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj
@@ -38,12 +38,12 @@
(defn-spec delete-pet-with-http-info any?
"Deletes a pet"
- ([pet-id int?, ] (delete-pet-with-http-info pet-id nil))
- ([pet-id int?, {:keys [api-key]} (s/map-of keyword? any?)]
- (check-required-params pet-id)
+ ([petId int?, ] (delete-pet-with-http-info petId nil))
+ ([petId int?, {:keys [api_key]} (s/map-of keyword? any?)]
+ (check-required-params petId)
(call-api "/pet/{petId}" :delete
- {:path-params {"petId" pet-id }
- :header-params {"api_key" api-key }
+ {:path-params {"petId" petId }
+ :header-params {"api_key" api_key }
:query-params {}
:form-params {}
:content-types []
@@ -52,9 +52,9 @@
(defn-spec delete-pet any?
"Deletes a pet"
- ([pet-id int?, ] (delete-pet pet-id nil))
- ([pet-id int?, optional-params any?]
- (let [res (:data (delete-pet-with-http-info pet-id optional-params))]
+ ([petId int?, ] (delete-pet petId nil))
+ ([petId int?, optional-params any?]
+ (let [res (:data (delete-pet-with-http-info petId optional-params))]
(if (:decode-models *api-context*)
(st/decode any? res st/string-transformer)
res))))
@@ -113,10 +113,10 @@
(defn-spec get-pet-by-id-with-http-info any?
"Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id int?]
- (check-required-params pet-id)
+ [petId int?]
+ (check-required-params petId)
(call-api "/pet/{petId}" :get
- {:path-params {"petId" pet-id }
+ {:path-params {"petId" petId }
:header-params {}
:query-params {}
:form-params {}
@@ -127,8 +127,8 @@
(defn-spec get-pet-by-id pet-spec
"Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions"
- [pet-id int?]
- (let [res (:data (get-pet-by-id-with-http-info pet-id))]
+ [petId int?]
+ (let [res (:data (get-pet-by-id-with-http-info petId))]
(if (:decode-models *api-context*)
(st/decode pet-spec res st/string-transformer)
res)))
@@ -160,11 +160,11 @@
(defn-spec update-pet-with-form-with-http-info any?
"Updates a pet in the store with form data"
- ([pet-id string?, ] (update-pet-with-form-with-http-info pet-id nil))
- ([pet-id string?, {:keys [name status]} (s/map-of keyword? any?)]
- (check-required-params pet-id)
+ ([petId string?, ] (update-pet-with-form-with-http-info petId nil))
+ ([petId string?, {:keys [name status]} (s/map-of keyword? any?)]
+ (check-required-params petId)
(call-api "/pet/{petId}" :post
- {:path-params {"petId" pet-id }
+ {:path-params {"petId" petId }
:header-params {}
:query-params {}
:form-params {"name" name "status" status }
@@ -174,9 +174,9 @@
(defn-spec update-pet-with-form any?
"Updates a pet in the store with form data"
- ([pet-id string?, ] (update-pet-with-form pet-id nil))
- ([pet-id string?, optional-params any?]
- (let [res (:data (update-pet-with-form-with-http-info pet-id optional-params))]
+ ([petId string?, ] (update-pet-with-form petId nil))
+ ([petId string?, optional-params any?]
+ (let [res (:data (update-pet-with-form-with-http-info petId optional-params))]
(if (:decode-models *api-context*)
(st/decode any? res st/string-transformer)
res))))
@@ -184,23 +184,23 @@
(defn-spec upload-file-with-http-info any?
"uploads an image"
- ([pet-id int?, ] (upload-file-with-http-info pet-id nil))
- ([pet-id int?, {:keys [additional-metadata ^File file]} (s/map-of keyword? any?)]
- (check-required-params pet-id)
+ ([petId int?, ] (upload-file-with-http-info petId nil))
+ ([petId int?, {:keys [additionalMetadata ^File file]} (s/map-of keyword? any?)]
+ (check-required-params petId)
(call-api "/pet/{petId}/uploadImage" :post
- {:path-params {"petId" pet-id }
+ {:path-params {"petId" petId }
:header-params {}
:query-params {}
- :form-params {"additionalMetadata" additional-metadata "file" file }
+ :form-params {"additionalMetadata" additionalMetadata "file" file }
:content-types ["multipart/form-data"]
:accepts []
:auth-names ["petstore_auth"]})))
(defn-spec upload-file any?
"uploads an image"
- ([pet-id int?, ] (upload-file pet-id nil))
- ([pet-id int?, optional-params any?]
- (let [res (:data (upload-file-with-http-info pet-id optional-params))]
+ ([petId int?, ] (upload-file petId nil))
+ ([petId int?, optional-params any?]
+ (let [res (:data (upload-file-with-http-info petId optional-params))]
(if (:decode-models *api-context*)
(st/decode any? res st/string-transformer)
res))))
diff --git a/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj b/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj
index 54d3523f7a1..a91c086c3fd 100644
--- a/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj
+++ b/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj
@@ -15,10 +15,10 @@
(defn-spec delete-order-with-http-info any?
"Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors"
- [order-id string?]
- (check-required-params order-id)
+ [orderId string?]
+ (check-required-params orderId)
(call-api "/store/order/{orderId}" :delete
- {:path-params {"orderId" order-id }
+ {:path-params {"orderId" orderId }
:header-params {}
:query-params {}
:form-params {}
@@ -29,8 +29,8 @@
(defn-spec delete-order any?
"Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors"
- [order-id string?]
- (let [res (:data (delete-order-with-http-info order-id))]
+ [orderId string?]
+ (let [res (:data (delete-order-with-http-info orderId))]
(if (:decode-models *api-context*)
(st/decode any? res st/string-transformer)
res)))
@@ -62,10 +62,10 @@
(defn-spec get-order-by-id-with-http-info any?
"Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions"
- [order-id string?]
- (check-required-params order-id)
+ [orderId string?]
+ (check-required-params orderId)
(call-api "/store/order/{orderId}" :get
- {:path-params {"orderId" order-id }
+ {:path-params {"orderId" orderId }
:header-params {}
:query-params {}
:form-params {}
@@ -76,8 +76,8 @@
(defn-spec get-order-by-id order-spec
"Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions"
- [order-id string?]
- (let [res (:data (get-order-by-id-with-http-info order-id))]
+ [orderId string?]
+ (let [res (:data (get-order-by-id-with-http-info orderId))]
(if (:decode-models *api-context*)
(st/decode order-spec res st/string-transformer)
res)))
diff --git a/samples/client/petstore/clojure/src/open_api_petstore/specs/order.clj b/samples/client/petstore/clojure/src/open_api_petstore/specs/order.clj
index cbaf5227e96..d87391bdf81 100644
--- a/samples/client/petstore/clojure/src/open_api_petstore/specs/order.clj
+++ b/samples/client/petstore/clojure/src/open_api_petstore/specs/order.clj
@@ -8,9 +8,9 @@
(def order-data
{
(ds/opt :id) int?
- (ds/opt :pet-id) int?
+ (ds/opt :petId) int?
(ds/opt :quantity) int?
- (ds/opt :ship-date) inst?
+ (ds/opt :shipDate) inst?
(ds/opt :status) string?
(ds/opt :complete) boolean?
})
diff --git a/samples/client/petstore/clojure/src/open_api_petstore/specs/pet.clj b/samples/client/petstore/clojure/src/open_api_petstore/specs/pet.clj
index 9bb51043ee3..cce6965d2f8 100644
--- a/samples/client/petstore/clojure/src/open_api_petstore/specs/pet.clj
+++ b/samples/client/petstore/clojure/src/open_api_petstore/specs/pet.clj
@@ -12,7 +12,7 @@
(ds/opt :id) int?
(ds/opt :category) category-spec
(ds/req :name) string?
- (ds/req :photo-urls) (s/coll-of string?)
+ (ds/req :photoUrls) (s/coll-of string?)
(ds/opt :tags) (s/coll-of tag-spec)
(ds/opt :status) string?
})
diff --git a/samples/client/petstore/clojure/src/open_api_petstore/specs/user.clj b/samples/client/petstore/clojure/src/open_api_petstore/specs/user.clj
index c20d4461b9f..cac72a0c72b 100644
--- a/samples/client/petstore/clojure/src/open_api_petstore/specs/user.clj
+++ b/samples/client/petstore/clojure/src/open_api_petstore/specs/user.clj
@@ -9,12 +9,12 @@
{
(ds/opt :id) int?
(ds/opt :username) string?
- (ds/opt :first-name) string?
- (ds/opt :last-name) string?
+ (ds/opt :firstName) string?
+ (ds/opt :lastName) string?
(ds/opt :email) string?
(ds/opt :password) string?
(ds/opt :phone) string?
- (ds/opt :user-status) int?
+ (ds/opt :userStatus) int?
})
(def user-spec