nmdp-bioinformatics / phycus

Service used for curation of Haplotype Frequency
GNU Lesser General Public License v3.0
7 stars 21 forks source link

Swagger-codegen can't make api/bin #2 #117

Closed dpratt3 closed 2 years ago

dpratt3 commented 2 years ago

make

rm -rf api
swagger-codegen generate --lang python -DpackageName=pyhfcus --input-spec ../../curation-swagger-spec.yaml --output api
Available languages: [android, aspnet5, async-scala, csharp, cpprest, dart, flash, python-flask, go, groovy, java, jaxrs, jaxrs-cxf, jaxrs-resteasy, jaxrs-spec, inflector, javascript, javascript-closure-angular, jmeter, nancyfx, nodejs-server, objc, perl, php, python, qt5cpp, ruby, scala, scalatra, silex-PHP, sinatra, rails5, slim, spring, dynamic-html, html, swagger, swagger-yaml, swift, tizen, typescript-angular2, typescript-angular, typescript-node, typescript-fetch, akka-scala, CsharpDotNet2, clojure, haskell, lumen, go-server]
cp setup.py api
mkdir api/bin
mkdir: cannot create directory 'api/bin': Not a directory
make: *** [Makefile:13: generate] Error 1
pbashyal-nmdp commented 2 years ago

swagger-codegen should create an api directory. It looks like swagger-codegen isn't running properly.

When I run it, it runs as:

> swagger-codegen generate --lang python -DpackageName=pyhfcus --input-spec ../../curation-swagger-spec.yaml --output api
17:28:22.321 [Thread-1] WARN  i.s.c.v.i.CodegenIgnoreProcessor - Output directory does not exist, or is inaccessible. No file (.swagger-codegen-ignore) will be evaluated.
17:28:22.613 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/pyhfcus/models/access_data.py
17:28:22.621 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/test/test_access_data.py
17:28:22.625 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/docs/AccessData.md
17:28:22.663 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/pyhfcus/models/cohort_data.py
17:28:22.670 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/test/test_cohort_data.py
17:28:22.677 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/docs/CohortData.md
17:28:22.709 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/pyhfcus/models/cohort_request.py
17:28:22.714 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file /Users/pbashyal/bioinformatics/phycus/client/python/api/test/test_cohort_request

What OS and version of swagger-codegen are you using ? Mine is:

> swagger-codegen version
3.0.29
dpratt3 commented 2 years ago

I was able to fix the issue; it was a problem with my local installation of swagger-codegen. I am using Ubuntu 20.04. After switching from the stable version of swagger-codegen to 3.0.30, it's working as expected. Thanks!