-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentHostingConfiguration.distributionConfigurations.supplementaryDistributionNetworks inconsistencies. #28
Comments
(Note that this issue does not affect Rel-16: it is a feature of Rel-17 onwards.) |
The design intent here is a dictionary (associative array, hash map) with a predetermined set of valid index keys. https://swagger.io/docs/specification/data-models/dictionaries/ |
If the index of the associative array cannot be strongly typed in OpenAPI, how about a simple array of objects that have two members: |
The array of objects with a pair of values would be:
|
Yes, that's precisely what I had in mind, @davidjwbbc. Thanks for saving me the trouble! |
This is a copy of release 17.2.0 of the TS26512_M1_ContentHostingProvisioning.yaml file with the `distributionConfigurations.supplementaryDistributionNetworks` structure changed in line with 5G-MAG/Standards#28. This fixes an issue where openapi-generator 5.2.0 looks for the wrong data type for distributionNetworkType and distributionMode.
This is a copy of release 17.2.0 of the TS26512_M1_ContentHostingProvisioning.yaml file with the `distributionConfigurations.supplementaryDistributionNetworks` structure changed in line with 5G-MAG/Standards#28. This fixes an issue where openapi-generator 5.2.0 looks for the wrong data type for distributionNetworkType and distributionMode.
Latest draft CR for Rel-17 available to 5G-MAG members on Causeway as CDT0107.3GPP SA4#121 TS26.512 API corrections. |
Formal CRs submitted to SA4#121:
|
The following Change Requests were agreed at SA4#121 Closing Plenary yesterday afternoon:
|
Change Request approved at SA#98-e:
|
New specifications published:
|
Description
From TS 26.512:
distributionConfigurations.supplementaryDistributionNetworks
field is a "Array(Map(DistributionNetworkType -> DistributionMode)", this has an uneven number of brackets. The text suggests that this is a mappings list, so "Array(" probably should not be there.distributionConfigurations.supplementaryDistributionNetworks
as an object with a "default" property whose value is aDistributionNetworkType
and any other property whose value is aDistributionMode
type. This is contradictory to the suggested structure in table 7.6.3.1-1.The table suggests that this structure should look something like:
However the OpenAPI in C.3.5 suggests that it would look like (where "default" is a mandatory property):
I suspect that the first interpretation, from the table, is the correct one. Unfortunately this cannot be explicitly specified in OpenAPI as the type of the object property keys cannot be defined, they have to be a plain
string
. If this structure is wanted, then the only option is to document what the key type should be in the object description text.(From discussion on this issue)
The alternative, in order to strongly type the two values, is to change this to an array of objects which have two mandatory fields, one for the
distributionNetworkType
and one for thedistributionMode
.Suggested solution
distributionConfigurations.supplementaryDistributionNetworks
in table 7.6.3.1-1 to say "Array(Object)" for the Data Type.distributionConfigurations.supplementaryDistributionNetworks
:DistributionNetworkType
DistributionMode
TS26512_M1_ContentHostingProvisioning.yaml#components/schemas/DistributionConfiguration/supplementaryDistributionNetworks
to:The text was updated successfully, but these errors were encountered: