Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [JAVA] dependentSchemas properties are not included in generated model with maven generator plugin #18923

Open
3 of 6 tasks
aleksandar-stefanovic-tamedia opened this issue Jun 14, 2024 · 0 comments

Comments

@aleksandar-stefanovic-tamedia

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I'm trying to generate client for API tests from provided OpenAPI file which I get from development team. Request body consists of some parameters. One of the option parameters extends if it is send. If you send deviceId than new addition parameters from dependentSchemas will be present/mandatory. See below. Issue is when you generate model. All properties apart one from dependentSchema are present in generated class.

How can I get all parameters inside generated request body class?

"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tenant": {
"type": "string",
"enum": [
"12app",
"24heures",
"bazonline",
"berneroberlaender",
"bernerzeitung",
"bilan",
"derbund",
"femina",
"fuw",
"landbote",
"langenthalertagblatt",
"lematindimanche",
"schweizerfamilie",
"sonntagszeitung",
"sihltaler",
"tagesanzeiger",
"tamedia",
"tdg",
"thalwileranzeiger",
"thunertagblatt",
"verkehrsmonitor",
"zsz",
"zuonline"
],
"example": "bazonline"
},
"deviceId": {
"type": "string"
},
"identityToken": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"example": [
"sport",
"premium"
],
"summary": "Article tags"
}
},
"required": [
"tenant",
"url",
"tags"
],
"dependentSchemas": {
"deviceId": {
"properties": {
"receipt": {
"type": "string"
},
"receiptSource": {
"type": "string",
"enum": [
"Apple",
"Google"
]
},
"receiptIdentifier": {
"type": "string",
"enum": [
"epaper",
"tablet",
"phone",
"universal",
"hybrid"
]
},
"packageName": {
"type": "string"
},
"productId": {
"type": "string"
},
"signature": {
"type": "string"
},
"termId": {
"type": "string"
}
},
"required": [
"receipt",
"receiptSource",
"receiptIdentifier",
"termId"
]
}
}
},

openapi-generator version

<openapi-generator-maven-plugin.version>7.6.0</openapi-generator-maven-plugin.version>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant