You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The es6 template-dir is taken from the github issue linked below.
cd into packages/petstore and run npm install
rerun my react app
First issue
The template-dir does not seem to solve the experimental classProperties problem:
../petstore/src/ApiClient.js
SyntaxError: /path/to/packages/petstore/src/ApiClient.js: Support for the experimental syntax 'classProperties' isn't currently enabled (231:33):
I can get around this issue by replacing all classProperties with methods of the same name.
Second issue
If I use the workaround in the first issue, I now receive the error
TypeError: _petstore_src__WEBPACK_IMPORTED_MODULE_5__.PetApi.getPetById is not a function
when importing import { PetApi } from '../path/to/petstore/src and trying to call
Description
I am trying to use swagger-codegen to generate client-side code in my monorepo project
Swagger-codegen version
2.4.7
Swagger declaration file content or url
http://petstore.swagger.io/v2/swagger.json
Command line used for generation
Steps to reproduce
swagger-codegen generate
command at thepackages
levelThe
es6
template-dir is taken from the github issue linked below.cd
intopackages/petstore
and runnpm install
rerun my react app
First issue
The template-dir does not seem to solve the experimental classProperties problem:
I can get around this issue by replacing all classProperties with methods of the same name.
Second issue
If I use the workaround in the first issue, I now receive the error
when importing
import { PetApi } from '../path/to/petstore/src
and trying to callRelated issues/PRs
#8024
I'm sure I'm missing an obvious step here, so any help is appreciated.
Thank you
The text was updated successfully, but these errors were encountered: