atiaomar1978-hub commented on code in PR #24844: URL: https://github.com/apache/camel/pull/24844#discussion_r3741010724
########## components/camel-apicurio-registry/src/main/java/org/apache/camel/component/apicurioregistry/ApicurioRegistryComponent.java: ########## @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.apicurioregistry; + +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.spi.Metadata; +import org.apache.camel.spi.annotations.Component; +import org.apache.camel.support.DefaultComponent; + +@Component("apicurio-registry") +public class ApicurioRegistryComponent extends DefaultComponent { + + @Metadata(label = "advanced", description = "The component configuration") + private ApicurioRegistryConfiguration configuration = new ApicurioRegistryConfiguration(); + + public ApicurioRegistryComponent() { + } + + public ApicurioRegistryComponent(CamelContext context) { + super(context); + } + + @Override + protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { + ApicurioRegistryConfiguration config = this.configuration.copy(); + + String groupId = null; + String artifactId = null; + if (remaining != null && !remaining.isEmpty()) { + String[] parts = remaining.split("/", 2); + groupId = parts[0]; Review Comment: **Grok:** URI parsing uses `remaining.split("/", 2)` — group IDs or artifact IDs containing `/` cannot be represented. If the registry allows such IDs, document the limitation or add URL encoding guidance. _AI-generated Grok inline comment on behalf of atiaomar1978-hub._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
