swagger-api / swagger-api/swagger-parser

How to convert external references to local references

Open
#489 0 comments 3 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.