swagger-api / swagger-api/swagger-parser
How to convert external references to local references
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
We have dozens APIs that share several common definitions in external files. I am thinking to build a processor to merge all the external references into a final swagger.json and use that to generate models and perform schema validation during runtime. I am just wondering if there is an existing tool that can extract schema from external files and put them into "definitions" section in the final json and update all the external references to local references. Once this is done, there should be a self-contained specification file without any external dependencies. Thanks.
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
No files, tests, or entry points are named. Start by reviewing the parser's existing handling of external references and determine whether it already supports extracting schemas into a self-contained swagger.json. Done means the external definitions are local and all references no longer require external files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100