From 8248bcbfc848848e4d4463f70984f8f1cc0ae0d7 Mon Sep 17 00:00:00 2001 From: Alin Rosca Date: Thu, 13 Jun 2024 13:09:05 +0300 Subject: [PATCH] APIGOV-27905 use api version if spec version is empty --- pkg/apic/servicebuilder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/apic/servicebuilder.go b/pkg/apic/servicebuilder.go index fba8b63fd..77fc9e7cb 100644 --- a/pkg/apic/servicebuilder.go +++ b/pkg/apic/servicebuilder.go @@ -312,6 +312,9 @@ func (b *serviceBodyBuilder) Build() (ServiceBody, error) { b.serviceBody.ResourceType = specProcessor.GetResourceType() b.serviceBody.specHash = fmt.Sprintf("%v", specParser.specHash) b.serviceBody.specVersion = specProcessor.GetVersion() + if b.serviceBody.specVersion == "" { + b.serviceBody.specVersion = b.serviceBody.Version + } // Check if the type is unstructured to gather more info