Code Generation Issues for 3GPP Provmns OpenApi

Code Generation Issues for 3GPP Provmns OpenApi

Issues & Decisions

Issue

Notes

Decision

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

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

5GcNrm.yaml

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)

5GcNrm.yaml

Disable all validation annotations

No validation at APOI level for anything
(@NotNull etc.)

 

3

Inner Objects and Attributes names with numbers as first character (many 5G objects) Not java name compliant

5GcNrm.yaml

Use reserveWordsMapping to map 5GCNfConnEcmInfo=FiveGCnfConnEcmInfo,

5gCNFType=FiveGCnfType etc..

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

  • Attempted enumOuterClass.mustache but did not get this working

  • issue arises even with just the GenericNrm model

5

Missing Models ?

  • ThresholdHysteresis

  • GeoAreaToCellMapping

  • UtraCellId

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

  1. 1,100 + classes (1,025 are from GenericNrm)

  2. Many (levels) of dependencies, even just the first model (GenericNrm) has 41 direct dependencies which then need to be handcrafted!

 

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

Class

Definition Location

Definition

Notes

1

ThresholdHysteresis

TS28111_FaultNrm.yaml Line # 82

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

TS28623_ComDefs.yaml Line # 118

GeoAreaToCellMapping: type: object properties: geoArea: $ref: '#/components/schemas/GeoArea' associationThreshold: type: integer
  1. Can attempt to cerate a basic yaml file and copy the generate code from that
    Might need to ‘replace’ the dependency tree

  2. GeoArea

    1. geoCoordinate

      1. Latitude

        1. Float (min -90, max 90)

      2. Longitude

        1. Float (min -180, max 180)

  3. Possible create a hidden API to generate these BEFORE we compile the ProvMnS API

3

UtraCellId

TS28623_ComDefs.yaml Line # 76

UtraCellId: type: integer

Can attempt to cerate a basic yaml file and copy the generate code from that

4

NullValue

TS29571_CommonData.yaml Line # 479

NullValue: enum: - null description: JSON's null value.

Not compatible with java.

Alternate Solutions

Solution

Solution Advantages

Solution Issues

Notes

Solution

Solution Advantages

Solution Issues

Notes

1

Applying workaround 2,3,4 & 5 above
Handcraft 3 missing classes & 1 incorrect (enum) class

it (seems to) work Need to test with an actual REST call using a resource model e.g NrNrm model data

  1. future maintainability

 

2

Write java code manually without generating from 3GPP yaml files

sorry cant see any advantage of this

  1. Very Time consuming (1,100+ classes, moren then our current code bases)

  2. Quality standard would required to write us test etc.

  3. Makes future upgrades (v18 → v19) more time consuming

 

3

Write java code manually without supporting ANY anyOf schema’s for Resource Object

Feasible (@Seán Beirne has this working before)

  1. Do we still need to generate/publish for this AP

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

  1. 1,100 + classes !

  2. Many (levels) of dependencies, even just the first model (GenericNrm) has 41 direct dependencies which then need to be handcrafted!

 

5

Create modified provmns api under different name supporting NO anyOf Schemas

CPS controls yaml files in repo

  1. Republishing API, Copyright issues may arise

  2. No support for resource schema’s

 

6

Limited implementation of the interface without Callbacks ( Notification Objects ) and without Nrm Resource models.

We avoid all the code generation problems.

  • Validation remains enabled

  • No ReservedWordsMappings needed

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