Temporarily disable xsd generation in schema-service 99/141599/1
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Wed, 30 Jul 2025 07:08:45 +0000 (09:08 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Wed, 30 Jul 2025 07:08:45 +0000 (09:08 +0200)
- skip the GenerateXsd class execution for the xsd files to avoid
  overriding files that are defined in the repo [0]
- enhance README to contain info about general setup of this repo

[0] further explanation [in the ticket](https://lf-onap.atlassian.net/browse/SO-4211)

Issue-ID: SO-4211
Change-Id: Id963a42a792eb2d89d4c425ba98f886598d21f25
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
README.md
aai-schema-gen/pom.xml

index 6b8bcab..5ec3617 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,10 +1,11 @@
 # AAI Schema Service
 
 ## Development
+
 ### Local setup
 In order to start the service locally, here is what needs to be done
 ``` bash
-mvn clean install 
+mvn clean install
 ```
 
 Above command only needs to be run the first time.
@@ -18,3 +19,16 @@ mvn -pl aai-schema-service -PrunAjsc
 ``` bash
 mvn formatter:format spotless:apply process-sources
 ```
+
+## Adjusting the schema
+
+This repo contains the schema that is used throughout AAI. The whole project is based on
+[EclipseLink MOXy](https://eclipse.dev/eclipselink/documentation/2.7/moxy/runtime003.htm) to load object representations of the schema that is defined in `./aai-schema/src/main/resources/onap/oxm` into memory during the runtime.
+
+Based on these files, artifacts for other tools are generated in this project as well.
+The `oxm/aai_oxm_vX.xml` files are converted to `aai_schema/aai_schema_vXX.xsd`'s that can be consumed by
+jaxb and to `aai_swagger_yaml/aai_swagger_vXX.yaml`'s that can be used for OpenApi generation.
+
+Having all this in mind, the schema can be adjusted by adjusting the `*.xsd` definitions to contain further endpoints
+and/or new objects.
+Running a `mvn install` will then trigger the `exec-maven-plugin` to invoke the `org.onap.aai.schemagen.GenerateXsd` class to generate the derived artifacts described above.
index 1a13d30..d4c6736 100644 (file)
                                     <goal>java</goal>
                                 </goals>
                                 <configuration>
+                                    <!-- skip true is a workaround to avoid overriding the schema that
+                                         is defined in aai-schema/src/main/resources/onap/aai_schema
+                                         with the output of the GenerateXsd class.
+                                         This is done to avoid adjusting the aai-schema/.../onap/oxm
+                                         files for the GraphNode changes.
+                                         There is further work required to adjust this module to allow
+                                         inheritance. -->
+                                    <skip>true</skip>
                                     <mainClass>org.onap.aai.schemagen.GenerateXsd</mainClass>
                                     <systemProperties>
                                         <systemProperty>