swagger-api / swagger-api/swagger-codegen-generators
OneOf property is failing during OAS Schema Validation
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Hello Team,
Requesting you to please check this issue and help. Performing schema validation with oneOf, discriminator and mapping property in oas3.0.
Error:
{
"fault": {
"faultstring": "OASValidation MAM-EXT-SpecValidation with resource "oas://openapi.yaml": failed with reason: "[ERROR - An error occurred during schema validation - com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException.: []]"",
"detail": {
"errorcode": "steps.oasvalidation.Failed"
}
}
}
yaml file looks like:
image
image
Json payload looks like:
--data '{ "billableHeader": { "sourceSystem": "UPSTREAM_APP", "sourceTransactionType": "INVOICE", "eventType": "BATCH", "messageCreationDatetime": "20220811140203", "timeZoneCode": "GMT", "isBulkProcessing": true, "product": "Airlcl" },
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 with the OpenAPI 3.0 YAML containing the oneOf, discriminator, and mapping definitions, then reproduce validation using the provided JSON payload. The YAML is shown only as images, so the schema and exact entry point are unavailable from the issue. Done means validation completes without the NullPointerException and the affected schema behavior is covered by a reproducible check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100