I'm not a swagger code-gen expert, but I think this a coding issue. If you generate (e.g.) Java code from the swagger, you'll presumably get an enum class with the values in the swagger, and this enum is used to data-type the state attribute in the main entity. You can presumably edit the java source to add additional values, but then what will happen if you need to generate the code again from the swagger, there'll be a conflict.
Also, if the swagger is used in some way to validate the message contents (runtime schema validation), you'll get a fail since the JSON document payload will have a value that is not in the schema.
But I'm sure there are code wizards out there who can give a better answer and explain how to do it.
------------------------------
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: Aug 19, 2021 01:59
From: Sravya A
Subject: TMF 678 - CustomerBillSate Type
Thanks @Jonathan Goldberg
#1. Yes, I meant without extending the swagger contract, can we add more states to default TMF schema- stateValue?
------------------------------
Sravya A
Oracle Corporation
------------------------------
Original Message:
Sent: Aug 18, 2021 02:28
From: Jonathan Goldberg
Subject: TMF 678 - CustomerBillSate Type
Hi Sravya
1. Not sure what you mean by "without extension" - the enum is there in the swagger file and if you have additional states you'll have to extend the swagger contract, no?
2. I don't know what is tested by the conformance profile, but I suspect that it doesn't test specific state transitions. Maybe @Henrique Rodrigues or @Victor Mari can chip in here
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.