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
Reference resolve issue for 3GPP Rel.16 definitions #638
Comments
We wrote test code for the variable `doc’ handling problem. openapi3/issue638_test.go
openapi3/testdata/issue638/test1.yaml
openapi3/testdata/issue638/test2.yaml
Result
I couldn't reproduce the problem unless the pathname in the argument of the function LoadFromFile is in this format. |
ShouheiNishi
added a commit
to ShouheiNishi/kin-openapi
that referenced
this issue
Dec 13, 2022
Merged
Merged
ShouheiNishi
added a commit
to ShouheiNishi/kin-openapi
that referenced
this issue
Dec 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are trying to generate code with the oapi-codegen from the 3GPP Rel.16 openapi definition .yaml file, but the reference resolution fails in the kin-openapi loader and the file cannot be loaded.
We use these files. All files are got from 3GPP webpage.
But encode of TS29544_Nspaf_SecuredPacket.yaml is fixed by hand.
The file from which the import is started is TS29571_CommonData.yaml.
TS28623_GenericNrm.yaml
TS28623_comDefs.yaml
TS29122_AsSessionWithQoS.yaml
TS29122_ChargeableParty.yaml
TS29122_CommonData.yaml
TS29122_CpProvisioning.yaml
TS29122_DeviceTriggering.yaml
TS29122_ECRControl.yaml
TS29122_GMDviaMBMSbyMB2.yaml
TS29122_GMDviaMBMSbyxMB.yaml
TS29122_MonitoringEvent.yaml
TS29122_MsisdnLessMoSms.yaml
TS29122_NIDD.yaml
TS29122_NpConfiguration.yaml
TS29122_PfdManagement.yaml
TS29122_RacsParameterProvisioning.yaml
TS29122_ReportingNetworkStatus.yaml
TS29122_ResourceManagementOfBdt.yaml
TS29502_Nsmf_PDUSession.yaml
TS29503_Nudm_EE.yaml
TS29503_Nudm_MT.yaml
TS29503_Nudm_NIDDAU.yaml
TS29503_Nudm_PP.yaml
TS29503_Nudm_SDM.yaml
TS29503_Nudm_UEAU.yaml
TS29503_Nudm_UECM.yaml
TS29505_Subscription_Data.yaml
TS29507_Npcf_AMPolicyControl.yaml
TS29508_Nsmf_EventExposure.yaml
TS29509_Nausf_SoRProtection.yaml
TS29509_Nausf_UEAuthentication.yaml
TS29509_Nausf_UPUProtection.yaml
TS29510_Nnrf_AccessToken.yaml
TS29510_Nnrf_Bootstrapping.yaml
TS29510_Nnrf_NFDiscovery.yaml
TS29510_Nnrf_NFManagement.yaml
TS29512_Npcf_SMPolicyControl.yaml
TS29514_Npcf_PolicyAuthorization.yaml
TS29517_Naf_EventExposure.yaml
TS29518_Namf_Communication.yaml
TS29518_Namf_EventExposure.yaml
TS29518_Namf_Location.yaml
TS29518_Namf_MT.yaml
TS29519_Application_Data.yaml
TS29519_Exposure_Data.yaml
TS29519_Policy_Data.yaml
TS29520_Nnwdaf_AnalyticsInfo.yaml
TS29520_Nnwdaf_EventsSubscription.yaml
TS29522_5GLANParameterProvision.yaml
TS29522_ACSParameterProvision.yaml
TS29522_AnalyticsExposure.yaml
TS29522_ApplyingBdtPolicy.yaml
TS29522_IPTVConfiguration.yaml
TS29522_LpiParameterProvision.yaml
TS29522_MoLcsNotify.yaml
TS29522_NIDDConfigurationTrigger.yaml
TS29522_ServiceParameter.yaml
TS29522_TrafficInfluence.yaml
TS29523_Npcf_EventExposure.yaml
TS29531_Nnssf_NSSAIAvailability.yaml
TS29531_Nnssf_NSSelection.yaml
TS29544_Nspaf_SecuredPacket.yaml
TS29554_Npcf_BDTPolicyControl.yaml
TS29571_CommonData.yaml
TS29572_Nlmf_Broadcast.yaml
TS29572_Nlmf_Location.yaml
TS32291_Nchf_ConvergedCharging.yaml
TS32291_Nchf_OfflineOnlyCharging.yaml
The error message is here.
We analyze loader code. We found some issues.
The arguments 'doc’ and 'path’ of the function 'resolveComponent’ in 'loader.go’ is sometimes incorrect. In such case, resolving reference is failed.
In the function 'resolveSchemaRef’, the aregumnt 'doc’ for recursive call of 'resolveSchemaRef’ must be use a value that points to the referenced document.
In these code
We think that there should be no processing after updating the value of 'component.value' and should return to the calling function immediately.
The attached diff seems to resolve the issue, but I am not sure about the validity.
In addition, we could not generate the smallest pattern to reproduction this issue.
test-fix.diff.gz
The text was updated successfully, but these errors were encountered: