OpenAPITools / OpenAPITools/openapi-generator
How to use typescript-axios in een quasar (vue) projects
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Hi,
I have added this script to my package.json of my quasar project.
"api-script": "openapi-generator generate -i api.json -g typescript-axios -o src/components/openapi"
To use it I have tried to import it in my vue template like this:
import Api from 'components/openapi/index.ts'
building the project results in a error:
`
These relative modules were not found:
- ./api in ./src/components/openapi/index.ts
- ./configuration in ./src/components/openapi/index.ts
`
Any idea's how I should use it in a quasar/vue cli project?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the package.json script, api.json, and the generated src/components/openapi/index.ts in the Quasar/Vue project. Run the openapi-generator command and the project build to reproduce the missing ./api and ./configuration imports. Done means the generated TypeScript Axios client can be imported and the project builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100