Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clojure] Improve api name for the Clojure client #2286

Merged
merged 1 commit into from
Mar 2, 2016
Merged

[Clojure] Improve api name for the Clojure client #2286

merged 1 commit into from
Mar 2, 2016

Conversation

xhh
Copy link
Contributor

@xhh xhh commented Mar 1, 2016

For example, when an operation's tag is users-api, users_api or UsersApi, generate the api file named users_api.clj and users-api as the namespace (it was usersapi.clj and usersapi before).

To implement this, I have to move the sanitizeTag method from DefaultGenerator.java to DefaultCodegen.java so that its behaviour can be overridden in ClojureClientCodegen.java, which is needed as the default implementation would sanitize users-api to usersapi before the tag is passed to toApiName and toApiFilename.

For example, when an operation's tag is "users-api", "users_api" or
"UsersApi", generate the api file named users_api.clj and "users-api"
as the namespace (it was "usersapi.clj" and "usersapi" before).

To implement this, I have to move the "sanitizeTag" method from
DefaultGenerator.java to DefaultCodegen.java so that its behaviour can
be overridden in ClojureClientCodegen.java, which is needed as the
default implementation would sanitize "users-api" to "usersapi" before
the tag is passed to "toApiName" and "toApiFilename".
@wing328 wing328 added this to the v2.1.6 milestone Mar 1, 2016
wing328 added a commit that referenced this pull request Mar 2, 2016
[Clojure] Improve api name for the Clojure client
@wing328 wing328 merged commit 4bcd81a into swagger-api:master Mar 2, 2016
@xhh xhh deleted the clj-api-name branch March 2, 2016 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants