Sorry for delay in answering this
Since the Open API data model is not an officially published asset, you will not be able to refer directly to the raw schemas that are used in the Open API project.
Presumably you could reference the #definitions section in a published API swagger 2.x file (or the equivalent OAS 3 section in v5 API publications) for the relevant API.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------
Original Message:
Sent: Mar 04, 2024 11:22
From: Adnan Crnovrsanin
Subject: Extending the schema
What type of reference can I put in allOf. Local path, url...?
------------------------------
Adnan Crnovrsanin
Swiss Federal Office of Information Technology, Systems and Telecommunication
Original Message:
Sent: May 21, 2023 06:10
From: Jonathan Goldberg
Subject: Extending the schema
Hi Ashish
I refer you to Part 2 of the Open API design guidelines TMF630 (https://projects.tmforum.org/wiki/display/PUB/TMF630+REST+API+Design+Guidelines+v4.2.0)
Let's suppose that (as in your example) you are extending the Account entity and schema to create an AccountExtension class.
In your payloads for AccountExtension
* @type would the string "AccountExtension"
* @baseType would be the string "Account"
* @schemaLocation would be a URL that logically describes your extension, for instance it could point to a yaml or json schema file with property definitions for "Customattribute1" and "Customattribute2" together with an allOf for the base Account schema.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
Original Message:
Sent: May 19, 2023 08:33
From: Ashish Sharma
Subject: Extending the schema
I have a basic query, if i need to extend my structure with custom attributes, should i use "schema location" or i can directly attach a substructure.
Also do i need to define a @type with schema location always?
For example do i have to use "Schemalocation" array name in JSON structure or can use a name as "AccountExtension"
"id": "string",
"accountType": "string",
"description": "string",
"LastName": null,
"state": "string",
"@schemaLocation":
{"Customattribute1": "string",
"Customattribute2": "string",
------------------------------
Ashish Sharma
Bharti Airtel Ltd
------------------------------