From c8296c7833432fcf780b4a170b007a31baf694e4 Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Wed, 2 Apr 2025 13:57:41 -0700
Subject: [PATCH] openapi: make explicit types for returned IDs

---
 openapi-internal.yaml | 18 +++++++++++++-----
 openapi.yaml          | 30 +++++++++++++++++++++++-------
 2 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/openapi-internal.yaml b/openapi-internal.yaml
index fa89fd2..1e3a311 100644
--- a/openapi-internal.yaml
+++ b/openapi-internal.yaml
@@ -246,7 +246,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/ScriptPolicyID"
         default:
           description: General Error
           content:
@@ -320,7 +320,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/ScriptID"
         default:
           description: General Error
           content:
@@ -392,12 +392,20 @@ components:
         minimum: 1
         maximum: 100
   schemas:
-    Id:
+    ScriptID:
       required:
-      - ID
+      - ScriptID
       type: object
       properties:
-        ID:
+        ScriptID:
+          type: integer
+          format: int64
+    ScriptPolicyID:
+      required:
+      - ScriptPolicyID
+      type: object
+      properties:
+        ScriptPolicyID:
           type: integer
           format: int64
     MapfixCreate:
diff --git a/openapi.yaml b/openapi.yaml
index 52a2d61..6e4e93f 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -209,7 +209,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/OperationID"
         default:
           description: General Error
           content:
@@ -520,7 +520,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/OperationID"
         default:
           description: General Error
           content:
@@ -831,7 +831,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/ScriptPolicyID"
         default:
           description: General Error
           content:
@@ -966,7 +966,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/Id"
+                $ref: "#/components/schemas/ScriptID"
         default:
           description: General Error
           content:
@@ -1106,12 +1106,28 @@ components:
         minimum: 1
         maximum: 100
   schemas:
-    Id:
+    OperationID:
       required:
-      - ID
+      - OperationID
       type: object
       properties:
-        ID:
+        OperationID:
+          type: integer
+          format: int32
+    ScriptID:
+      required:
+      - ScriptID
+      type: object
+      properties:
+        ScriptID:
+          type: integer
+          format: int64
+    ScriptPolicyID:
+      required:
+      - ScriptPolicyID
+      type: object
+      properties:
+        ScriptPolicyID:
           type: integer
           format: int64
     Roles: