Make OpenAPI files & config schema avaialble in RTD docs 78/140478/3
authorJohnKeeney <john.keeney@est.tech>
Thu, 13 Mar 2025 17:35:59 +0000 (17:35 +0000)
committerJohnKeeney <john.keeney@est.tech>
Thu, 13 Mar 2025 17:57:40 +0000 (17:57 +0000)
Change-Id: I0952c3b2b0060dac4a514276d22c068ec432591d
Signed-off-by: JohnKeeney <john.keeney@est.tech>
Issue-ID: CCSDK-4073
Signed-off-by: JohnKeeney <john.keeney@est.tech>
.gitignore
.readthedocs.yaml
a1-policy-management/README.md
a1-policy-management/api/offeredapis/application_configuration_schema.json [new file with mode: 0644]
a1-policy-management/config/application.yaml
a1-policy-management/pom.xml
docs/conf.py

index 7ad4a3c..8a5ff8e 100644 (file)
@@ -45,3 +45,4 @@ _build/
 docs/offeredapis/**/README.md
 a1-policy-management/api/offeredapis/openapigentool/**/README.md
 a1-policy-management/api/**/.openapi-generator**
+a1-policy-management/custom/
index 62a44d8..3fb1e2f 100644 (file)
@@ -31,6 +31,10 @@ build:
     post_build:
       - mkdir -p ${READTHEDOCS_OUTPUT}html/openapi
       - cp -v -r docs/offeredapis/openapitoolgen/offeredapis/pms-api/* ${READTHEDOCS_OUTPUT}html/openapi
+      - cp -v -r docs/offeredapis/swagger/*.json ${READTHEDOCS_OUTPUT}html/openapi
+      - cp -v -r docs/offeredapis/swagger/*.yaml ${READTHEDOCS_OUTPUT}html/openapi
+      - cp -v -r docs/offeredapis/*.json ${READTHEDOCS_OUTPUT}html/openapi
+      - cp -v -r docs/offeredapis/*.yaml ${READTHEDOCS_OUTPUT}html/openapi
 
 python:
   install:
index 746eb65..5250595 100644 (file)
@@ -58,7 +58,7 @@ More information about the ONAP CCSDK A1 Policy Management Service can be found
 
 ONAP : ccsdk oran
 Copyright (C) 2019-2023 Nordix Foundation. All rights reserved.
-Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
+Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
 Licensed 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
diff --git a/a1-policy-management/api/offeredapis/application_configuration_schema.json b/a1-policy-management/api/offeredapis/application_configuration_schema.json
new file mode 100644 (file)
index 0000000..3186dae
--- /dev/null
@@ -0,0 +1,91 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+    "config": {
+      "type": "object",
+      "properties": {
+        "//description": {
+          "type": "string"
+        },
+        "description": {
+          "type": "string"
+        },
+        "controller": {
+          "type": "array",
+          "items": [
+            {
+              "type": "object",
+              "properties": {
+                "name": {
+                  "type": "string"
+                },
+                "baseUrl": {
+                  "type": "string"
+                },
+                "userName": {
+                  "type": "string"
+                },
+                "password": {
+                  "type": "string"
+                }
+              },
+              "required": [
+                "name",
+                "baseUrl",
+                "userName",
+                "password"
+              ],
+              "additionalProperties": false
+            }
+          ]
+        },
+        "ric": {
+          "type": "array",
+          "items": [
+            {
+              "type": "object",
+              "properties": {
+                "name": {
+                  "type": "string"
+                },
+                "baseUrl": {
+                  "type": "string"
+                },
+                "controller": {
+                  "type": "string"
+                },
+                "customAdapterClass": {
+                  "type": "string"
+                },
+                "managedElementIds": {
+                  "type": "array",
+                  "items": [
+                    {
+                      "type": "string"
+                    },
+                    {
+                      "type": "string"
+                    }
+                  ]
+                }
+              },
+              "required": [
+                "name",
+                "baseUrl"
+              ],
+              "additionalProperties": false
+            }
+          ]
+        }
+      },
+      "required": [
+        "ric"
+      ],
+      "additionalProperties": true
+    }
+  },
+  "required": [
+    "config"
+  ]
+}
index 47d038e..95c5f75 100644 (file)
@@ -3,7 +3,7 @@
 # ONAP : ccsdk oran
 # ================================================================================
 # Copyright (C) 2020-2023 Nordix Foundation. All rights reserved.
-# Modifications Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ app:
   # A URL to authorization provider such as OPA. Each time an A1 Policy is accessed, a call to this
   # authorization provider is done for access control. If this is empty, no fine grained access control is done.
   authorization-provider:
-  # the config-file-schema-path referres to a location in the jar file. If this property is empty or missing,
+  # the config-file-schema-path refers to a location in the jar file. If this property is empty or missing,
   # no schema validation will be executed.
   config-file-schema-path: /application_configuration_schema.json
   # Postgres database usage is enabled using the below parameter.
index 295c6d3..2214291 100644 (file)
                                         <include>openapitoolgen/offeredapis/pms-api/v3/custom/index.html</include>
                                     </includes>
                                 </resource>
+                                <resource>
+                                    <directory>${project.basedir}/src/main/resources/</directory>
+                                    <includes>
+                                        <include>application_configuration_schema.json</include>
+                                    </includes>
+                                </resource>
                             </resources>
                         </configuration>
                     </execution>
index 5cd858a..8696caf 100644 (file)
@@ -84,6 +84,9 @@ spelling_lang = "en_GB"
 
 html_extra_path = [
     'offeredapis/openapitoolgen'
+    # note:
+    #   during the readthedocs build, additional files are copied, e.g. into directory "/openapi"
+    #   See .readthedocs.yaml file
 ]
 
 #