swagger-api / swagger-api/swagger-parser
default value for Object schema is not converted correctly
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
swagger-parser-v3 version: 2.0.17
When parsing openapi document which has a default value for an object schema, has the default value set as an object of type com.fasterxml.jackson.databind.node.ObjectNode. The value should have been of type Schema. Please use a sample schema and check the value of _default or getDefault for the schema.
defaultSchema:
type: object
properties:
id:
type: integer
default: 100
name:
type: string
default: Ashii
default:
id: 100
name: Ash

Thanks,
Aishvarya
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 by reproducing the issue with swagger-parser-v3 2.0.17 and the sample OpenAPI object schema. Inspect the schema's _default or getDefault value after parsing; done means the object default is represented as a Schema rather than a Jackson ObjectNode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100