swagger-api / swagger-api/swagger-ui
How to import function from the utils.js ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hi all,
I'm customising swagger for a project with React and Swagger-ui.
I have imported Swagger in a new react-app like this :
import SwaggerUI from 'swagger-ui'
I'm creating components or customising by overwriting some of them but when I need function from the core/utils.js the function can not be found...
For example, I want to use the function getSampleSchema by doing :
import {getSampleSchema} from "swagger-ui" or import {getSampleSchema} from "core/utils"
is not working. Do you know how I can do that ? Or if there is a better way to customise the components ?
Thanks
Configuration :
React : 16.4.1
Swagger : 3.17.2
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 core/utils.js and the package entry point used by import SwaggerUI from "swagger-ui". Check whether getSampleSchema is intended to be publicly importable and compare that with the documented component-customization path. Done means the supported import or customization approach is established and verified in the stated React and Swagger UI versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100