Hi Prashanth,
This definitely doesn't work with the OAS currently generated by TM Forum. You will need to generate your own OAS.
You would need to extend the RequestBody:
GeographicAddress_FVO:
description: The GeographicAddress to be created
content:
application/json:
schema:
$ref: '#/components/schemas/GeographicAddress_FVO'
by something like
GeographicAddress_FVO:
description: The GeographicAddress to be created
content:
application/json:
schema:
$ref: '#/components/schemas/GeographicAddress_FVO'
application/json-patch+json:
schema:
$ref: '#/components/schemas/JsonPatch_FVO'
application/json-patch-query+json:
schema:
$ref: '#/components/schemas/JsonPatchQuery_FVO'
Once this is added some code-generators (e.g. OpenAPI generator for java/spring) will generate code with proper content negotiation.
Your mileage might vary with other generators.
Regards
------------------------------
Koen Peeters
Ciminko SA
------------------------------
Original Message:
Sent: Oct 07, 2025 05:58
From: prashanth kumaraswamy
Subject: Query on TMF 630 guideline – JSON-Patch+JSON vs JSON-Patch+query in OAS
We are working on creating an OAS specification to support multiple content types as per the TMF 630 guidelines.
In our scenario:
For application/json-patch+json, the request body is defined as an object.
For application/json-patch+query, the request body is defined as an array.
However, current OpenAPI generators do not seem to support generating API interfaces with two different request body structures based on content type. They tend to default to the request body in first content type encountered.
Has anyone else faced this issue? If so, could you suggest any possible solutions or workarounds (other than vendor extensions, which are causing issues with Swagger rendering)?
------------------------------
prashanth kumaraswamy
TO BE VERIFIED
------------------------------