swagger-api / swagger-api/swagger-parser

No out-of-the-box methods to serialize SwaggerParseResult back into JSON

Open
#2,029 1 comment 1 reaction 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

I discovered that OpenAPIV3Parser provides methods to deserialize Open API doc JSON, but doesn't allow to serialize it back. If, for example, I need to make a deep copy of SwaggerParseResult, I can't serialize it back into a JSON and then create a new SwaggerParseResult by deserializing that JSON. In fact, I'm not sure what the official guideline is for recovering the original JSON from SwaggerParseResult (suppose I don't store it in memory)

Please consider providing out-of-the-box methods to serialize SwaggerParseResult back into JSON

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 with the existing OpenAPIV3Parser deserialization methods and the SwaggerParseResult model to understand the current representation and supported inputs. Define what serialization should return for a parsed result, then verify that the output can be deserialized to recover the same document without requiring the original JSON to remain in memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.