Skip to content

Commit 1bf15e9

Browse files
authored
Merge pull request #105 from it-at-m/feat/eai-client-internal-update-spec
chore(ticketing-eai/api-client-internal): update spec add attachment endpoint
2 parents d868178 + b80c93d commit 1bf15e9

File tree

3 files changed

+122
-4
lines changed

3 files changed

+122
-4
lines changed

ticketing-eai/api-client-internal/src/main/java/de/muenchen/oss/dbs/ticketing/eai/client/ApiClientAutoConfiguration.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package de.muenchen.oss.dbs.ticketing.eai.client;
22

33
import de.muenchen.oss.dbs.ticketing.eai.client.api.ArticlesApi;
4+
import de.muenchen.oss.dbs.ticketing.eai.client.api.AttachmentsApi;
45
import de.muenchen.oss.dbs.ticketing.eai.client.api.OrganizationsApi;
56
import de.muenchen.oss.dbs.ticketing.eai.client.api.TicketsApi;
67
import de.muenchen.oss.dbs.ticketing.eai.client.api.UsersApi;
@@ -46,6 +47,12 @@ public ArticlesApi articlesApi(final ApiClient apiClient) {
4647
return new ArticlesApi(apiClient);
4748
}
4849

50+
@Bean
51+
@ConditionalOnMissingBean
52+
public AttachmentsApi attachmentsApi(final ApiClient apiClient) {
53+
return new AttachmentsApi(apiClient);
54+
}
55+
4956
@Bean
5057
@ConditionalOnMissingBean
5158
public OrganizationsApi organizationsApi(final ApiClient apiClient) {

ticketing-eai/api-client-internal/src/main/resources/api-spec-internal-without-security.json

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
},
88
"servers": [
99
{
10-
"url": "https://dbs-ticketing-eai-test-dbs-ticketing-eai.apps.capk.muenchen.de",
10+
"url": "https://dbs-ticketing-eai-integration-dbs-ticketing-eai.apps.capk.muenchen.de",
1111
"description": "Generated server url"
1212
}
1313
],
1414
"tags": [
15+
{
16+
"name": "Attachments",
17+
"description": "Endpoints to receive Attachment-Data for downloading."
18+
},
1519
{
1620
"name": "Articles",
1721
"description": "Reading and Creating Articles in Zammad."
@@ -1098,6 +1102,55 @@
10981102
}
10991103
}
11001104
},
1105+
"/attachments/{ticketID}/{articleID}/{attachmentID}": {
1106+
"get": {
1107+
"tags": [
1108+
"Attachments"
1109+
],
1110+
"summary": "Get Attachment of given article id from given ticket id by given attachment id.",
1111+
"description": "Receives the attachment with the ID attachmentID of the article articleID from the ticket ticketID and forwards it as a binary data stream.",
1112+
"operationId": "getAttachment",
1113+
"parameters": [
1114+
{
1115+
"name": "ticketID",
1116+
"in": "path",
1117+
"required": true,
1118+
"schema": {
1119+
"type": "string"
1120+
}
1121+
},
1122+
{
1123+
"name": "articleID",
1124+
"in": "path",
1125+
"required": true,
1126+
"schema": {
1127+
"type": "string"
1128+
}
1129+
},
1130+
{
1131+
"name": "attachmentID",
1132+
"in": "path",
1133+
"required": true,
1134+
"schema": {
1135+
"type": "string"
1136+
}
1137+
}
1138+
],
1139+
"responses": {
1140+
"default": {
1141+
"description": "Attachment as binary data.",
1142+
"content": {
1143+
"*/*": {
1144+
"schema": {
1145+
"type": "string",
1146+
"format": "octet-stream"
1147+
}
1148+
}
1149+
}
1150+
}
1151+
}
1152+
}
1153+
},
11011154
"/actuator": {
11021155
"get": {
11031156
"tags": [
@@ -2201,7 +2254,7 @@
22012254
"in": "header",
22022255
"scheme": "bearer",
22032256
"bearerFormat": "JWT",
2204-
"openIdConnectUrl": "https://ssotest.muenchen.de/auth/realms/intrap/.well-known/openid-configuration"
2257+
"openIdConnectUrl": "https://ssodev.muenchen.de/auth/realms/KM81/.well-known/openid-configuration"
22052258
}
22062259
}
22072260
}

ticketing-eai/api-client-internal/src/main/resources/api-spec-internal.json

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
},
88
"servers": [
99
{
10-
"url": "https://dbs-ticketing-eai-test-dbs-ticketing-eai.apps.capk.muenchen.de",
10+
"url": "https://dbs-ticketing-eai-integration-dbs-ticketing-eai.apps.capk.muenchen.de",
1111
"description": "Generated server url"
1212
}
1313
],
1414
"tags": [
15+
{
16+
"name": "Attachments",
17+
"description": "Endpoints to receive Attachment-Data for downloading."
18+
},
1519
{
1620
"name": "Articles",
1721
"description": "Reading and Creating Articles in Zammad."
@@ -1203,6 +1207,60 @@
12031207
]
12041208
}
12051209
},
1210+
"/attachments/{ticketID}/{articleID}/{attachmentID}": {
1211+
"get": {
1212+
"tags": [
1213+
"Attachments"
1214+
],
1215+
"summary": "Get Attachment of given article id from given ticket id by given attachment id.",
1216+
"description": "Receives the attachment with the ID attachmentID of the article articleID from the ticket ticketID and forwards it as a binary data stream.",
1217+
"operationId": "getAttachment",
1218+
"parameters": [
1219+
{
1220+
"name": "ticketID",
1221+
"in": "path",
1222+
"required": true,
1223+
"schema": {
1224+
"type": "string"
1225+
}
1226+
},
1227+
{
1228+
"name": "articleID",
1229+
"in": "path",
1230+
"required": true,
1231+
"schema": {
1232+
"type": "string"
1233+
}
1234+
},
1235+
{
1236+
"name": "attachmentID",
1237+
"in": "path",
1238+
"required": true,
1239+
"schema": {
1240+
"type": "string"
1241+
}
1242+
}
1243+
],
1244+
"responses": {
1245+
"default": {
1246+
"description": "Attachment as binary data.",
1247+
"content": {
1248+
"*/*": {
1249+
"schema": {
1250+
"type": "string",
1251+
"format": "octet-stream"
1252+
}
1253+
}
1254+
}
1255+
}
1256+
},
1257+
"security": [
1258+
{
1259+
"dbs-ticketing-eai-secscheme": []
1260+
}
1261+
]
1262+
}
1263+
},
12061264
"/actuator": {
12071265
"get": {
12081266
"tags": [
@@ -2306,7 +2364,7 @@
23062364
"in": "header",
23072365
"scheme": "bearer",
23082366
"bearerFormat": "JWT",
2309-
"openIdConnectUrl": "https://ssotest.muenchen.de/auth/realms/intrap/.well-known/openid-configuration"
2367+
"openIdConnectUrl": "https://ssodev.muenchen.de/auth/realms/KM81/.well-known/openid-configuration"
23102368
}
23112369
}
23122370
}

0 commit comments

Comments
 (0)