-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add deepObject query string support in Java native client #14378
Conversation
Appears this change has introduced a bug, when generating a Java native client - from a contract having a oneOf with discriminator set using allOf:
Contract example: openapi: 3.0.3
info:
contact:
email: [email protected]
name: name
url: https://whatever.com
description: Internal API
title: Internal API
version: 1.0.0
x-audience: business-unit-internal
x-api-id: 3addb128-c3fb-4bfe-a5d9-c84b3bd58ca2
servers:
- description: Local environment
url: http://localhost:9090/api
paths:
/authenticated/organizations/aspects/physical-aspects:
get:
operationId: listAll
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalAspectsResponse'
description: List of the physicals
summary: List all physicals
tags:
- Physical
x-accepts: application/json
put:
operationId: update
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePhysicalRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalAspectResponse'
description: Physical aspect updated successfully
summary: Update Physical aspect
tags:
- Physical
x-content-type: application/json
x-accepts: application/json
components:
schemas:
PhysicalAspectsResponse:
example:
physicals:
- identifiable_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
mounting: null
- identifiable_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
mounting: null
properties:
physicals:
items:
$ref: '#/components/schemas/PhysicalAspect'
type: array
required:
- physicals
type: object
UpdatePhysicalRequest:
example:
physical:
identifiable_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
mounting: null
properties:
physical:
$ref: '#/components/schemas/PhysicalAspect'
required:
- physical
type: object
PhysicalAspectResponse:
example:
physical:
identifiable_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
mounting: null
properties:
physical:
$ref: '#/components/schemas/PhysicalAspect'
required:
- physical
type: object
PhysicalAspect:
example:
identifiable_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
mounting: null
properties:
identifiable_id:
format: uuid
type: string
mounting:
$ref: '#/components/schemas/PhysicalMounting'
required:
- identifiable_id
- mounting
type: object
PhysicalMounting:
oneOf:
- $ref: '#/components/schemas/NotMountedMounting'
- $ref: '#/components/schemas/FloorMounting'
- $ref: '#/components/schemas/LocationMounting'
type: object
NotMountedMounting:
allOf:
- $ref: '#/components/schemas/Discriminator'
properties:
mountable_type:
$ref: '#/components/schemas/MountableType'
type: object
FloorMounting:
allOf:
- $ref: '#/components/schemas/Discriminator'
properties:
mountable_type:
$ref: '#/components/schemas/MountableType'
orientation:
format: float
maximum: 360
minimum: -360
type: number
required:
- orientation
type: object
LocationMounting:
allOf:
- $ref: '#/components/schemas/Discriminator'
properties:
mountable_type:
$ref: '#/components/schemas/MountableType'
type: object
Discriminator:
discriminator:
propertyName: object_type
properties:
object_type:
type: string
required:
- object_type
type: object
MountableType:
enum:
- FIXED
- LOCATION
type: string
|
@s-jepsen thanks for reporting the issue. Let me fix it. |
@wing328 have you fixed this yet? If not, here's a branch I'm currently working on: master...bjorgvino:openapi-generator:fix-supportUrlQuery-templates-and-additionalProperties Just struggling with errors that were present on |
Fixed in #14496 |
Add deepObject query string support in Java native client
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.3.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)cc @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10)