From 1ca61162837053c3754ab333b57b64aa7fc41e77 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Wed, 30 Jul 2025 09:08:45 +0200 Subject: [PATCH] Temporarily disable xsd generation in schema-service - 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 --- README.md | 16 +++++++++++++++- aai-schema-gen/pom.xml | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b8bcab..5ec3617 100644 --- 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. diff --git a/aai-schema-gen/pom.xml b/aai-schema-gen/pom.xml index 1a13d30..d4c6736 100644 --- a/aai-schema-gen/pom.xml +++ b/aai-schema-gen/pom.xml @@ -371,6 +371,14 @@ java + + true org.onap.aai.schemagen.GenerateXsd -- 2.16.6