swagger-api / swagger-api/swagger-parser
BinarySchema V2 to V3 conversion results in StringSchema being used..
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
When using the V3 maven plugin, and a V2 schema with a property such as:
secret:
type: string
format: binary
minLength: 32
result = Json.mapper().convertValue(schema, Schema.class);
schema goes in as BinarySchema (v2) and result comes out as StringSchema (v3)..
This is using swagger-parser-v2-converter 2.0.15.
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 at modules/swagger-parser-v2-converter/src/main/java/io/swagger/v3/parser/converter/SwaggerConverter.java around line 951 and reproduce the V2 YAML example through the V3 Maven plugin. Check why converting the V2 BinarySchema produces a V3 StringSchema. Done means the binary property remains represented as the appropriate binary schema after conversion, with its stated constraints preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100