You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2025/08/25 05:00:47 UTC

(ofbiz-plugins) 01/01: Adds example-product.rest.xml showcasing multiple rest.xml files per component

This is an automated email from the ASF dual-hosted git repository.

deepak pushed a commit to branch multiple-rest-file
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git

commit 2615784e6ca64d1e1fe264a69fede5e886b48287
Author: Deepak Dixit <de...@hotwax.co>
AuthorDate: Mon Aug 25 10:30:28 2025 +0530

    Adds example-product.rest.xml showcasing multiple rest.xml files per component
---
 example/api/product.rest.xml | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/example/api/product.rest.xml b/example/api/product.rest.xml
new file mode 100644
index 000000000..32161beae
--- /dev/null
+++ b/example/api/product.rest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<api name="ExampleRestApi"
+     displayName="Example REST API"
+     path="example-product"
+     description="This API exposes example product services as REST endpoints."
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/rest-api.xsd">
+
+    <resource name="ExampleProductResource"
+              path="product"
+              displayName="Example Product Resource"
+              description="Handles example-product operations">
+
+        <operation verb="post" description="Find product by id"
+                   consumes="application/json">
+            <service name="findProductById"/>
+        </operation>
+    </resource>
+</api>
\ No newline at end of file