@manyos/smileconnect-api 1.72.1 → 1.72.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,3 +62,46 @@ customResponse.data = {
62
62
 
63
63
  customResponse.code = 203
64
64
  ```
65
+
66
+ ## Custom OpenAPI Specification
67
+
68
+ Since ScriptEnpoint parameters and responses are defined in your scripts, no automatic documentation generation is possible. You can define a custom OpenAPI specification for your script endpoint. This allows you to define the request and response schema for your endpoint.
69
+
70
+ The OpenAPI specification is defined in the endpoint's metadata. The following example shows a valid OpenAPI specification for a ScriptEndpoint. You can specify the request and response schemas as JSON objects as well as a summary and description.
71
+
72
+ ```javascript
73
+ {
74
+ "summary": "Run scripts associated with this endpoint",
75
+ "description": "Run scripts associated with this endpoint",
76
+ "requestSchema": {
77
+ "type": "object",
78
+ "properties": {
79
+ "loginid": {
80
+ "type": "string",
81
+ "maxLength": 15,
82
+ "description": "Login ID"
83
+ }
84
+ },
85
+ "required": [
86
+ "loginid"
87
+ ]
88
+ },
89
+ "responseSchema": {
90
+ "type": "object",
91
+ "properties": {
92
+ "approver": {
93
+ "type": "string",
94
+ "description": "Approver username"
95
+ }
96
+ },
97
+ "required": [
98
+ "approver"
99
+ ]
100
+ }
101
+ }
102
+ ```
103
+
104
+ ![Custom OpenAPI Spec](../_media/scriptendpoint-openapi-config.png)
105
+
106
+ ![Resulting OpenAPI Spec](../_media/scriptendpoint-openapi-result.png)
107
+
package/docs/releases.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Release Notes
2
2
 
3
3
  ## API
4
+ ### 1.72.3 - 20.01.26
5
+ Improve connection handling on OAUTH2 Adapater & LDAP Adapter
6
+
7
+ ### 1.72.2 - 14.11.25
8
+ Remove cmdbObjects from openApi spec when no fields are defined.
9
+
4
10
  ### 1.72.1 - 13.11.25
5
11
  Improve OpenAPI Documentation generation. Add requestBody for POST and put requests. Allow custom definition for scriptendpoints.
6
12
 
@@ -294,6 +300,10 @@ Update Record added to [Remedy Adapter](adapter#remedy).
294
300
  The eventmanager will check all outbound webhooks for an event. If one fails, the whole Event will be set to error and the details will be added to the error message.
295
301
 
296
302
  ## GUI
303
+ ### 1.15.0 - 14.11.25
304
+
305
+ Feat: Add Open API Specs Configuration to ScriptEndpoints
306
+
297
307
  ### 1.14.1 - 25.03.25
298
308
 
299
309
  Feat: Add Script Endpoints Config
@@ -1,24 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>SMILEconnect API Specification</title>
5
- <!-- needed for adaptive design -->
6
- <meta charset="utf-8"/>
7
- <meta name="viewport" content="width=device-width, initial-scale=1">
8
- <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
3
+ <head />
4
+ <body>
5
+ <H1>SMILEconnect API Specification</H1>
6
+ <script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
7
+ <div id="redoc-container"></div>
9
8
 
10
- <!--
11
- ReDoc doesn't change outer page styles
12
- -->
13
- <style>
14
- body {
15
- margin: 0;
16
- padding: 0;
17
- }
18
- </style>
19
- </head>
20
- <body>
21
- <redoc spec-url='https://smileconnect.manyosdocs.de/openapi.json'></redoc>
22
- <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
23
- </body>
9
+ <script>
10
+ Redoc.init('https://smileconnect.manyosdocs.de/openapi.json', {
11
+ "showExtensions": true
12
+ }, document.getElementById('redoc-container'))
13
+ </script>
14
+ </body>
24
15
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.72.1",
3
+ "version": "1.72.3",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
package/util/config.js CHANGED
@@ -521,11 +521,10 @@ async function getDesignPackage(clientId) {
521
521
  //generate docs for cmdb
522
522
  const cmdbMapping = getDeprecatedMappingAsCustom('cmdbobject')
523
523
 
524
- if (clientConfig.cmdbobject && clientConfig.cmdbobject.fields) {
524
+ if (clientConfig.cmdbobject && clientConfig.cmdbobject.fields && clientConfig.cmdbobject.fields.length > 0) {
525
525
  schemas['cmdbobject'] = await getObjectSchema(clientConfig.cmdbobject.fields, cmdbMapping, 'AST:BaseElement')
526
526
  schemas['cmdbobject_create_update'] = await getObjectSchema(clientConfig.cmdbobject.fields, cmdbMapping, 'AST:BaseElement', true)
527
527
 
528
-
529
528
  const cmdbdef = Object.keys(clientConfig.cmdbobject)
530
529
  const classConfigs = cmdbdef.filter(item => item.startsWith('fields_'))
531
530
  const cmdbSchemaList = ['cmdbobject']