Code Generation Issues for 3GPP Provmns OpenApi
Issues & Decisions
Issue | Notes | Decision | |
|---|---|---|---|
| 1 | Many code genaration issues | See Table below | @Csaba Kocsis We do the limited implementation i.e Alternate Solution #6 |
| 2 | Can we re-publish (our version) of the API | License on original interface still unclear |
|
Code Generation Issues
Observed Issue | Occurrences(s) | Workaround(s) | Workaround Disadvantage/Problem | Notes & Decisions | |
|---|---|---|---|---|---|
| 1 | Max value for gNBId of 4294967295 exceeds the max value for a Java int of 2147483647 | Modify the mappings from integer=int to integer=long to allow larger numbers. | code generation does not convert integer max value to long (by adding l) See issue #2 |
| |
| 2 | Max values to large (for int) | Disable all validation annotations | No validation at APOI level for anything |
| |
| 3 | Inner Objects and Attributes names with numbers as first character (many 5G objects) Not java name compliant | Use reserveWordsMapping to map
| Maintenance of any future object with similar non-java compliant names |
| |
| 4 | Enums without defining any possible values (not allowed in Java) | NullValue | ‘Replacement’ with dummy in production code & blacklist | Still get issue #5 below |
|
| 5 | Missing Models ? |
| add ‘empty’ missing class in production code. | How do we know what they should look like? See tabel below |
|
| 6 | N/A | N/A | White-List include specific files only |
|
|
| 7 | N/A | N/A | Black-List failing classes like NullValue | dependent classes fail to compile still |
|
Missing / Incorrect Java Classes
The missing classes can be found in the include files but for some reason are not processed/included during code generation
Class | Definition Location | Definition | Notes | |
|---|---|---|---|---|
| 1 |
| ThresholdHysteresis:
type: object
required:
- high
properties:
high:
oneOf:
- type: integer
- $ref: 'TS28623_ComDefs.yaml#/components/schemas/Float'
low:
$ref: 'TS28623_ComDefs.yaml#/components/schemas/Float'
| Can attempt to cerate a basic yaml file and copy the generate code from that | |
| 2 |
| GeoAreaToCellMapping:
type: object
properties:
geoArea:
$ref: '#/components/schemas/GeoArea'
associationThreshold:
type: integer
|
| |
| 3 |
| UtraCellId:
type: integer | Can attempt to cerate a basic yaml file and copy the generate code from that | |
| 4 |
| NullValue:
enum:
- null
description: JSON's null value. | Not compatible with java. |
Alternate Solutions
Solution | Solution Advantages | Solution Issues | Notes | |
|---|---|---|---|---|
| 1 | Applying workaround 2,3,4 & 5 above | it (seems to) work Need to test with an actual REST call using a resource model e.g NrNrm model data |
|
|
| 2 | Write java code manually without generating from 3GPP yaml files | sorry cant see any advantage of this |
|
|
| 3 | Write java code manually without supporting ANY anyOf schema’s for Resource Object | Feasible (@Seán Beirne has this working before) |
| generate code as far as we can get and then copy into production code |
| 4 | Fix problems by contributing bug fix to 3GPP | Positive contribution from CPS team outside of ONAP |
|
|
| 5 | Create modified provmns api under different name supporting NO anyOf Schemas | CPS controls yaml files in repo |
|
|
| 6 | Limited implementation of the interface without Callbacks ( Notification Objects ) and without Nrm Resource models. | We avoid all the code generation problems.
| We need to document the limited support ( follow the whitelist ) | May 22, 2025 Preferred solution by @Csaba Kocsis during meeting with CPS. @Priyank Maheshwari Solution working Commit |