swagger-api / swagger-api/swagger-codegen

generated javascript client is base on umd module,can not be used in es6 module environment

Open
#6,915 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

generated javascript client is base on umd module,can not be used in es6 module environment

Code
import {UserApi,User} from "../consultant/index";
Errors

./src/consultant/index.js
Line 26: 'define' is not defined no-undef
Line 28: 'define' is not defined no-undef

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the generated src/consultant/index.js and reproduce the no-undef errors when importing it in an ES6 module environment. Trace how the JavaScript client is generated, then verify that the resulting client can be imported without the reported define errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.