Open f-f opened 6 years ago
I found an openapi spec that causes the Clojoure openapi-generator to generate invalid code.
This generates invalild ns require statements like:
[mattermost-clj.specs. :refer :all]
e.g.
(ns mattermost-clj.specs.post-metadata-embeds
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[mattermost-clj.specs. :refer :all]
)
(:import (java.io File)))
I think until spec generation is well-tested there should be a config option on the Clojure generator to disable specs.
For anyone using homebrew who wants to downgrade to a version that doesn't use specs:
brew uninstall openapi-generator
Install a pre-4.x version:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/53d1f029cb5694a41640cff05a3791e5ffac37c6/Formula/openapi-generator.rb
Description
As we figured out in #122, the current Petstore spec is not enough to test all the edge cases of the generator.
Suggest a fix/enhancement
As @wing328 suggested in https://github.com/OpenAPITools/openapi-generator/pull/122#issuecomment-403228826, we should start testing on the fake petstore spec.
Rough list of things to do for this issue:
bin/clojure-petstore.sh
to test against that new specsamples/client/fake-petstore/clojure/test/