swagger-api / swagger-api/validator-badge
Swagger/OpenAPI - UnrecognizedPropertyException
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 227
- Forks
- 81
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 1
Description
Getting below error when using the given request model
"Error 500: javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "RQSHDR" (Class iseries.wsbeans.ServiceInput.RQSHDR_DS), not marked as ignorable
Request:
"{"RQSHDR":[{"ID":"20423","Name":"226229","DOCTYPE":"EXCEL"}],"RQSLEN":1,"RQSDS":[{"DSID":"148490","DS":"40026","AMOUNT":"250.00"}]}"
Here is sample code:
"ServiceInput": {
"type": "object",
"properties": {
"RQSHDR": {
"type": "object",
"$ref": "#/definitions/rqshdr_DS"
},
"RQSLEN": {
"type": "integer",
"format": "int32"
},
"RQSDS": {
"type": "array",
"items": {
"$ref": "#/definitions/rqsdtl_DS"
}
}
}
}
And
"rqshdr_DS": {
"type": "object",
"properties": {
"ID": {
"type": "string",
"maxLength": 30
},
"NAME": {
"type": "string",
"maxLength": 10
},
"DOCTYPE": {
"type": "string",
"maxLength": 4
}
}
},
"rqsdtl_DS": {
"type": "object",
"properties": {
"DSID": {
"type": "string",
"maxLength": 10
},
"DS": {
"type": "string",
"maxLength": 25
},
"AMOUNT": {
"type": "string",
"maxLength": 12
}
}
},
Please assist to resolve
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 source file, test, or entry point is named. Start with the supplied OpenAPI schema and the UnrecognizedPropertyException, then reproduce the request against validator-badge to determine whether the schema or validation behavior is at fault. Done means the cause is confirmed and covered by a focused validation case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100