code: func (s *specAggregator) UpdateAPIServiceSpec(apiServiceName string, spec *spec.Swagger, etag string) error {
  	s.rwMutex.Lock()
  	defer s.rwMutex.Unlock()
  
  	specInfo, existingService := s.openAPISpecs[apiServiceName]
  	if !existingService {
  		return fmt.Errorf("APIService %q does not exists", apiServiceName)
  	}
  
  	// For APIServices (non-local) specs, only merge their /apis/ prefixed endpoint as it is the only paths
  	// proxy handler delegates.
  	if specInfo.apiService.Spec.Service != nil {
  		spec = aggregator.FilterSpecByPathsWithoutSideEffects(spec, []string{"/apis/"})
  	}
  
  	return s.tryUpdatingServiceSpecs(&openAPISpecInfo{
  		apiService: specInfo.apiService,
  		spec:       spec,
  		handler:    specInfo.handler,
  		etag:       etag,
  	})
  }
docs: // UpdateAPIServiceSpec updates the api service's OpenAPI spec. It is thread safe.