diff --git a/.github/workflows/acebase.yml b/.github/workflows/acebase.yml
new file mode 100644
index 00000000..dbd1d779
--- /dev/null
+++ b/.github/workflows/acebase.yml
@@ -0,0 +1,51 @@
+name: 'acebase-build'
+
+on:
+ push:
+ tags:
+ - v*
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: msa-ez/acebase
+
+jobs:
+ test:
+ name: install
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: ./acebase
+ steps:
+ - uses: actions/checkout@v4
+ - name: Use Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14
+ - name: Cache node modules
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: node_modules
+ key: npm-packages-${{ hashFiles('**/package-lock.json') }}
+ - name: Install Dependencies
+ if: steps.cache.outputs.cache-hit != 'true'
+ run: npm install
+ - name: Log in to the Container registry
+ uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ secrets.ID }}
+ password: ${{ secrets.TOKEN }}
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
+ with:
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+ - name: Build and push Docker image
+ uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
+ with:
+ context: ./acebase
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
\ No newline at end of file
diff --git a/.github/workflows/github-actions.yml b/.github/workflows/platform.yml
similarity index 87%
rename from .github/workflows/github-actions.yml
rename to .github/workflows/platform.yml
index 81eb3d4e..b5a9b057 100644
--- a/.github/workflows/github-actions.yml
+++ b/.github/workflows/platform.yml
@@ -1,6 +1,13 @@
name: 'platform-build'
-on: push
+on:
+ push:
+ tags:
+ - v*
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
jobs:
test:
@@ -27,8 +34,8 @@ jobs:
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
+ username: ${{ secrets.ID }}
+ password: ${{ secrets.TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
diff --git a/acebase/main.js b/acebase/main.js
index 291872c4..e10d533f 100644
--- a/acebase/main.js
+++ b/acebase/main.js
@@ -12,8 +12,8 @@ const https = process.env.DB_HTTPS ? process.env.DB_HTTPS : false; // DB PORT
const provider = process.env.PROVIDER ? process.env.PROVIDER : "github"; // DB PORT
const gitlab = process.env.GITLAB ? process.env.GITLAB : null; // DB PORT
const server = new AceBaseServer(dbname, {
- host: "localhost",
- port: 5757,
+ host: host,
+ port: dbport,
storage: {
path: "/acebase"
},
@@ -40,14 +40,13 @@ server.configAuthProvider(provider, {
host: gitlab
})
-
server.on("ready", () => {
console.log("SERVER ready");
});
const db = new AceBaseClient({
- host: "localhost",
- port: 5757,
+ host: host,
+ port: dbport,
dbname: dbname,
https: JSON.parse(https),
});
diff --git a/gcloud b/gcloud
new file mode 100644
index 00000000..e69de29b
diff --git a/package.json b/package.json
index c779c88c..9733e277 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
},
"main": "background.js",
"dependencies": {
+ "@apidevtools/swagger-parser": "^10.1.0",
"@crinkles/digl": "^2.0.3",
"@firebase/auth": "^1.3.0",
"@hscmap/vue-window": "^2.4.2",
@@ -201,7 +202,8 @@
"electron-devtools-installer": "^3.1.0",
"fork-ts-checker-webpack-plugin": "^6.5.2",
"husky": "^7.0.2",
- "jest": "^29.6.2",
+ "jest": "^29.7.0",
+ "jest-environment-jsdom-fifteen": "^1.0.2",
"node-sass": "^7.0.1",
"prettier": "2.6.2",
"prismjs": "^1.24.1",
diff --git a/src/components/designer/MarketPlace.vue b/src/components/designer/MarketPlace.vue
index 4fa4b034..056a6867 100644
--- a/src/components/designer/MarketPlace.vue
+++ b/src/components/designer/MarketPlace.vue
@@ -4,24 +4,24 @@
Marketplace
mdi-close
Templates
Toppings
-
-
@@ -29,9 +29,9 @@
@@ -44,16 +44,16 @@
@@ -66,25 +66,25 @@
{{ temp.description }}
{{ temp.name }}
Rating: {{ temp.rating }}
@@ -99,16 +99,16 @@
@@ -121,26 +121,26 @@
{{ topping.description }}
{{ topping.name }}
Rating: {{ topping.rating }}
@@ -161,19 +161,19 @@
{{ selectedTemplate.name }}
{{ selectedTemplate.description }}
Rating: {{ selectedTemplate.rating }}
@@ -184,16 +184,16 @@
apply
@@ -207,19 +207,19 @@
{{ selectedTopping.name }}
{{ selectedTopping.description }}
Rating: {{ selectedTopping.rating }}
@@ -233,19 +233,19 @@
{{ depends }}
-
+
apply
@@ -256,358 +256,358 @@
\ No newline at end of file
diff --git a/src/components/designer/context-mapping-modeling/ContextMappingModelCanvas.vue b/src/components/designer/context-mapping-modeling/ContextMappingModelCanvas.vue
index 0ca800bc..ea576119 100644
--- a/src/components/designer/context-mapping-modeling/ContextMappingModelCanvas.vue
+++ b/src/components/designer/context-mapping-modeling/ContextMappingModelCanvas.vue
@@ -1039,6 +1039,7 @@
@@ -1149,37 +1150,37 @@
}
await me.putObject(`db://definitions/${settingProjectId}/information`, {
- author: me.userInfo.uid,
- authorEmail: me.userInfo.email,
- lastVersionName: version,
- comment: me.storageCondition.comment,
- createdTimeStamp: Date.now(),
- lastModifiedTimeStamp: Date.now(),
- lastModifiedUser: null,
- lastModifiedEmail: null,
- projectName: me.storageCondition.projectName,
- type: me.storageCondition.type ? me.storageCondition.type : me.canvasType,
- projectId: settingProjectId,
- firstCommit: null,
- associatedProject: me.information.associatedProject
+ author: me.userInfo.uid,
+ authorEmail: me.userInfo.email,
+ lastVersionName: version,
+ comment: me.storageCondition.comment,
+ createdTimeStamp: Date.now(),
+ lastModifiedTimeStamp: Date.now(),
+ lastModifiedUser: null,
+ lastModifiedEmail: null,
+ projectName: me.storageCondition.projectName,
+ type: me.storageCondition.type ? me.storageCondition.type : me.canvasType,
+ projectId: settingProjectId,
+ firstCommit: null,
+ associatedProject: me.information.associatedProject
})
await me.pushObject(`db://definitions/${settingProjectId}/snapshotLists`,{
- lastSnapshotKey: '',
- snapshot: JSON.stringify(defaultValue),
- snapshotImg: null,
- timeStamp: Date.now()
+ lastSnapshotKey: '',
+ snapshot: JSON.stringify(defaultValue),
+ snapshotImg: null,
+ timeStamp: Date.now()
})
let valueUrl = await me.putString(`storage://definitions/${settingProjectId}/versionLists/${version}/versionValue`, JSON.stringify(defaultValue));
await me.putObject(`db://definitions/${settingProjectId}/versionLists/${version}`, {
- saveUser: me.userInfo.uid,
- saveUserEmail: me.userInfo.email,
- saveUserName: me.userInfo.name,
- projectName: me.storageCondition.projectName,
- img: null,
- timeStamp: Date.now(),
- comment: me.storageCondition.comment,
- valueUrl: valueUrl
+ saveUser: me.userInfo.uid,
+ saveUserEmail: me.userInfo.email,
+ saveUserName: me.userInfo.name,
+ projectName: me.storageCondition.projectName,
+ img: null,
+ timeStamp: Date.now(),
+ comment: me.storageCondition.comment,
+ valueUrl: valueUrl
})
if( me.storageCondition.type == 'es' ){
diff --git a/src/components/designer/es-modeling/EventStormingModelCanvas.vue b/src/components/designer/es-modeling/EventStormingModelCanvas.vue
index c90afe58..10ba06f1 100644
--- a/src/components/designer/es-modeling/EventStormingModelCanvas.vue
+++ b/src/components/designer/es-modeling/EventStormingModelCanvas.vue
@@ -1,12 +1,12 @@
@@ -22,19 +22,19 @@
해당 BoundedContext ( {{ deleteBounded }} )데이터가
삭제되었습니다.
@@ -44,19 +44,19 @@
{{ ideSnackBar.icon }}{{ ideSnackBar.icon }}
@@ -67,12 +67,12 @@
Close
@@ -92,39 +92,39 @@
{{ snackbar.text }}
close
{{ alertInfo.text }}
Github Persenal Access Token 발행 방법Github Persenal Access Token 발행 방법
{{ alertInfo.submit }}
{{ $t("word.close") }}{{ $t("word.close") }}
@@ -161,89 +161,90 @@
@@ -254,13 +255,13 @@
mdi-undo
@@ -270,13 +271,13 @@
mdi-redo
@@ -289,8 +290,8 @@
-
- mdi-home
-
+
+ mdi-home
+
mdi-cog
+ :disabled="disableBtn"
+ @click="openExportDialog()"
+ color="#8d8d8d"
+ >mdi-cog
@@ -341,37 +342,37 @@
mdi-kubernetes
DEPLOY
@@ -381,44 +382,44 @@
mdi-hexagon-outlinemdi-hexagon-outline
Hexagonal
mdi-view-dashboard
VIEW
@@ -427,15 +428,15 @@
{{item.title}}
+ >{{item.title}}
@@ -488,41 +489,41 @@
mdi-restartmdi-restart
Versions
@@ -531,17 +532,17 @@
@@ -549,26 +550,26 @@
+ style="font-size: medium;">
{{item.version}}
{{convertTimeStampToDate(item.timeStamp)}}{{convertTimeStampToDate(item.timeStamp)}}
@@ -576,8 +577,8 @@
mdi-restart
+ >mdi-restart
REPLAY
@@ -608,26 +609,26 @@
@@ -637,18 +638,18 @@
{{ icon.join }}
@@ -660,49 +661,49 @@
{{
icon.save
- }}
+ }}
SAVE
{{
icon.fork
- }}
+ }}
FORK
@@ -710,20 +711,20 @@
{{
- item.title
+ >{{
+ item.title
}}
@@ -731,50 +732,50 @@
{{
icon.share
- }}
+ }}
SHARE
{{
- requestCount
+ requestCount
}}
@@ -782,15 +783,15 @@
{{
- item.title
+ >{{
+ item.title
}}
@@ -808,41 +809,41 @@
-->
{{
icon.code
- }}
+ }}
CODE
@@ -850,18 +851,18 @@
{{
- item.title
+ >{{
+ item.title
}}
@@ -895,99 +896,99 @@
{{icon.join}}
{{joinRequestedText.text }}
{{ icon.fork}}
{{
icon.save
- }}
+ }}
{{ item.title }}
+ >{{ item.title }}
{{
icon.share
- }}
+ }}
@@ -998,37 +999,37 @@
{{ item.title }}
+ >{{ item.title }}
mdi-restart
@@ -1037,21 +1038,21 @@
{{
- icon.code
+ icon.code
}}
@@ -1059,149 +1060,149 @@
{{ item.title }}
+ >{{ item.title }}
mdi-kubernetesmdi-kubernetes
mdi-hexagon-outlinemdi-hexagon-outline
mdi-view-dashboardmdi-view-dashboard
{{ item.title }}
+ >{{ item.title }}
mdi-checkbox-multiple-blank-outline
mdi-hexagon-outlinemdi-hexagon-outline
@@ -1229,81 +1230,81 @@
Draggable Screen : onDraggable Screen : on
Draggable Screen : offDraggable Screen : off
mdi-border-insidemdi-border-inside
mdi-border-nonemdi-border-none
Arrange Guidance : onArrange Guidance : on
Arrange Guidance : offArrange Guidance : off
@@ -1312,27 +1313,27 @@
@@ -1341,90 +1342,90 @@
Draggable Screen : onDraggable Screen : on
Draggable Screen : offDraggable Screen : off
mdi-border-insidemdi-border-inside
mdi-border-nonemdi-border-none
Arrange Guidance : onArrange Guidance : on
Arrange Guidance : offArrange Guidance : off
@@ -1484,24 +1485,24 @@
mdi-database-plusmdi-database-plus
@@ -1509,27 +1510,27 @@
mdi-database-plusmdi-database-plus
@@ -1539,42 +1540,29 @@
-
-
-
- {{ }} Token
-
-
-
-
-
-
Manage ClustersManage Clusters
mdi-close
@@ -1584,8 +1572,8 @@
@@ -1593,14 +1581,14 @@
@@ -1610,10 +1598,10 @@
-->
@@ -1635,14 +1623,14 @@
@@ -1680,33 +1668,33 @@
Token DialogToken Dialog
DownloadDownload
CancelCancel
@@ -1715,7 +1703,7 @@
Fork
+ >Fork
{{ icon.fork }}
@@ -1725,16 +1713,16 @@
Fork
+ color="green darken-1"
+ text
+ @click="saveComposition('fork')"
+ >Fork
CloseClose
@@ -1743,7 +1731,7 @@
WarningWarning
There are
@@ -1757,21 +1745,21 @@
See detailsSee details
CancelCancel
Open IDE
+ color="primary"
+ text
+ @click="openIdeAccept(),functionSelect('Project IDE')"
+ >Open IDE
mdi-kubernetesmdi-kubernetes
@@ -1897,29 +1885,29 @@
Select Public
+ >Select Public
{{ key }}
@@ -1929,16 +1917,16 @@
Apply
Close
@@ -1951,13 +1939,13 @@
Select Process
{{
command.name
- }}
+ }}
mdi-open-in-new
@@ -1966,9 +1954,9 @@
Close
@@ -1977,26 +1965,28 @@
Select Model for PBCSelect Model for PBC
mdi-closemdi-close
@@ -2009,24 +1999,24 @@
@@ -2067,37 +2057,37 @@
{{ otherMouseEvent.name }}
@@ -2105,41 +2095,41 @@
Select for mirror element
SelectSelect
@@ -2149,2830 +2139,2048 @@
diff --git a/src/components/designer/es-modeling/EventStormingModelPanel.vue b/src/components/designer/es-modeling/EventStormingModelPanel.vue
index 071d42e7..f7e09cec 100644
--- a/src/components/designer/es-modeling/EventStormingModelPanel.vue
+++ b/src/components/designer/es-modeling/EventStormingModelPanel.vue
@@ -5,7 +5,7 @@
import getParent from "../../../utils/getParent";
import isAttached from '../../../utils/isAttached';
-
+
var jsondiffpatch = require('jsondiffpatch').create({
objectHash: function (obj, index) {
return '$$index:' + index;
@@ -45,9 +45,9 @@
openValidationLists:false,
validationLevelIcon:
{
- 'error' : {icon: 'mdi-close-circle-outline', color:'#E53935'},
- 'warning' : {icon: 'mdi-alert-outline', color:'#FFA726'},
- 'info' : {icon: 'mdi-information-outline', color:'#29B6F6'},
+ 'error' : {icon: 'mdi-close-circle-outline', color:'#E53935'},
+ 'warning' : {icon: 'mdi-alert-outline', color:'#FFA726'},
+ 'info' : {icon: 'mdi-information-outline', color:'#29B6F6'},
},
// command, external
@@ -68,14 +68,30 @@
// this.setElementCanvas();
},
computed: {
+ isOpenAPIPBC(){
+ if(!this.isPBCModel) return false
+ if(!this.value.pbcId) return false
+ if(!this.canvas.value.elements[this.value.pbcId]) return false;
+
+ if(Object.keys(this.canvas.value.elements[this.value.pbcId].modelValue).length == 0) return true
+
+ return false;
+ },
+ isReadOnly(){
+ if(this.canvas.isReadOnlyModel) return true
+ if(this.readOnly) return true
+ if(this.isPBCModel) return true
+
+ return false
+ },
translateObj(){
return {'usedTranslate': this.usedTranslate , 'translateText': this.translateText}
},
getImage(){
- if(this.image){
- return this.image
- }
- return null;
+ if(this.image){
+ return this.image
+ }
+ return null;
},
titleName() {
if(this.value){
@@ -127,11 +143,11 @@
},
"value.name": _.debounce(async function (newVal) {
var me = this
- me.changedNamePanel(me.value.name)
+ me.changedNamePanel(me.value.name)
}, 500),
"value.description": _.debounce(async function (newVal) {
var me = this
- me.changedDescriptionPanel(me.value.description)
+ me.changedDescriptionPanel(me.value.description)
}, 500),
// value: {
// deep: true,
diff --git a/src/components/designer/es-modeling/PBCModelList.vue b/src/components/designer/es-modeling/PBCModelList.vue
index cc7ba1d9..5ce1390b 100644
--- a/src/components/designer/es-modeling/PBCModelList.vue
+++ b/src/components/designer/es-modeling/PBCModelList.vue
@@ -15,17 +15,16 @@
:disabled="showLoading && index != selectedTabIndex"
:href="`#${tabObj.id}`"
:key="tabObj.key"
- style="height:45px;"
+ style="height:45px; width: max-content;"
>
{{tabObj.display}}
-
{{tabObj.totalCount == null ? '...': (tabObj.totalCount == 0 ? '0' : tabObj.totalCount)}}
-
mdi-magnify
@@ -110,7 +109,11 @@
-
+
+
+
+
+
@@ -155,7 +158,8 @@
-
+
+
마지막 페이지 [최대 27개 표시(최근 수정날짜 기준)]
@@ -166,6 +170,7 @@
-
-
-
-
-
\ No newline at end of file
+ }
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/designer/es-modeling/elements/DomainEventDefinition.vue b/src/components/designer/es-modeling/elements/DomainEventDefinition.vue
index baeccba1..082cd5b4 100644
--- a/src/components/designer/es-modeling/elements/DomainEventDefinition.vue
+++ b/src/components/designer/es-modeling/elements/DomainEventDefinition.vue
@@ -59,8 +59,8 @@
-
+
@@ -281,7 +282,7 @@
})
}
return text
-
+
}
return null
},
diff --git a/src/components/designer/es-modeling/elements/EventStormingModelElement.vue b/src/components/designer/es-modeling/elements/EventStormingModelElement.vue
index 249205c9..a5c0a747 100644
--- a/src/components/designer/es-modeling/elements/EventStormingModelElement.vue
+++ b/src/components/designer/es-modeling/elements/EventStormingModelElement.vue
@@ -139,9 +139,10 @@
return this.value.elementView
},
showValidation() {
- if (this.elementValidationResults.length == 0) {
- return false
- }
+ if (this.elementValidationResults.length == 0) return false
+ if (this.isPBCModel) return false;
+ if (!this.value.mirrorElement) return false;
+
return true
},
showValidationImg() {
@@ -212,14 +213,14 @@
var editable = true
me.newEditUserImg.some(function(user, index){
- if(user.uid == me.getEditUid){
- return true
- }
- // edit condition
- if( user.action == 'userPanelOpen' ){
- editable = false
- return true
- }
+ if(user.uid == me.getEditUid){
+ return true
+ }
+ // edit condition
+ if( user.action == 'userPanelOpen' ){
+ editable = false
+ return true
+ }
})
return editable
@@ -624,7 +625,6 @@
var afterViewObj = {x: offsetX, y: offsetY, width: offsetW, height: offsetH}
var beforeViewObj = {x: originX, y: originY, width: originW, height: originH}
- // me.delayedMoveAction(beforeViewObj, afterViewObj)
me.canvas.moveElementAction(me.value, beforeViewObj, afterViewObj)
}catch (e) {
alert(`[Error] ModelElement-delayedMove: ${e}`)
@@ -644,7 +644,6 @@
})
offsetVertices = JSON.stringify(newVertices)
- // me.delayedRelationMoveAction(originVertices, offsetVertices)
me.canvas.moveElementAction(me.value, originVertices, offsetVertices)
}catch (e) {
alert(`[Error] ModelElement - delayedRelationMove: ${e}`)
@@ -891,6 +890,10 @@
}
},
delayedRelationMoveAction(originVertices, offsetVertices) {
+ /*
+ !!! REMOVE !!!!
+ changedMethod: canvas.moveElementAction
+ */
var me = this
if (me.isCustomMoveExist) {
@@ -927,7 +930,7 @@
me.movingElement = true;
}catch (e) {
- alert(`[Error] ModelElement-onMoveElement: ${e}`)
+ alert(`[Error] ModelElement-onMove Element: ${e}`)
}
},
onMoveRelation(newObj,STATUS_COMPLETE){
diff --git a/src/components/designer/es-modeling/elements/PBC.vue b/src/components/designer/es-modeling/elements/PBC.vue
index aed8b568..e73ed58b 100644
--- a/src/components/designer/es-modeling/elements/PBC.vue
+++ b/src/components/designer/es-modeling/elements/PBC.vue
@@ -133,7 +133,12 @@
+
@@ -235,6 +240,13 @@
this.deletePBCModeling(this.value.elementView.id);
},
watch: {
+ "value.commands": {
+ deep: true,
+ handler: function (newVal, oldVal) {
+ var me = this
+ me.drawPBCModeling()
+ }
+ },
"panelValue":function(newVal, oldVal){
this.drawPBCModeling()
},
@@ -242,7 +254,7 @@
deep: true,
handler: function (newVal, oldVal) {
var me = this
- me.drawPBCModeling()
+ me.drawPBCModeling()
}
},
},
@@ -309,8 +321,8 @@
let rightSideElement = [];
- // leftSideElement = leftSideElement.concat(element.commands, element.policies)
- leftSideElement = leftSideElement.concat(element.commands)
+ leftSideElement = leftSideElement.concat(element.commands, element.views)
+ // leftSideElement = leftSideElement.concat(element.commands)
leftSideElement = leftSideElement.filter(ele => ele && (!ele.visibility || ele.visibility == 'public'))
if(leftSideElement.length > 0) {
let leftElementLen = leftSideElement.length;
@@ -324,6 +336,19 @@
item.elementView.y = pbcTopY + (leftElementH/2) + yDistance*(idx+1) + (leftElementH * idx)
item.elementView.height = leftElementH;
me.$set(pbcElements, item.elementView.id, item)
+
+ if(item.aggregate && Object.keys(item.aggregate).length > 0){
+ console.log(item.aggregate)
+ item.aggregate.pbcId = pbcId
+ item.aggregate.elementView.id = item.aggregate.elementView.id + idx
+ item.aggregate.elementView.x = item.elementView.x + item.elementView.width
+ item.aggregate.elementView.y = item.elementView.y
+ item.aggregate.elementView.height = item.elementView.height
+
+ me.$set(pbcElements, item.aggregate.elementView.id, item.aggregate)
+ }
+
+
})
}
@@ -369,11 +394,13 @@
}
},
- openProject() {
+ openProject(isOpenAPI) {
var me = this
- var url = `#/storming/${me.value.modelValue.projectId}`
- console.log(url)
- window.open(url, '_blank')
+ if(isOpenAPI){
+ window.open(me.value.modelValue.openAPI, '_blank')
+ } else {
+ window.open(`#/storming/${me.value.modelValue.projectId}`, '_blank')
+ }
}
}
}
diff --git a/src/components/designer/es-modeling/elements/ViewDefinition.vue b/src/components/designer/es-modeling/elements/ViewDefinition.vue
index 9b7c7d92..5576b120 100644
--- a/src/components/designer/es-modeling/elements/ViewDefinition.vue
+++ b/src/components/designer/es-modeling/elements/ViewDefinition.vue
@@ -2,8 +2,8 @@
Creating Aggregate... stop
@@ -119,8 +119,8 @@
:sub-right="'5px'"
:sub-bottom="'5px'"
>
-
-
@@ -311,7 +312,7 @@
let model = Object.assign([], parent.value)
- return{
+ return{
description: this.value.description,
value: this.value,
model: model,
@@ -356,10 +357,10 @@
async onGenerationFinished(model){
this.generateDone = true;
this.$emit('update:generateDone', true);
- },
+ },
generate(){
this.generator.generate();
- this.generateDone = false;
+ this.generateDone = false;
},
stop(){
this.generator.stop()
@@ -420,7 +421,7 @@
var validationResultIndex = me.elementValidationResults.findIndex(x=> (x.code == me.ESE_NOT_PK) )
if( validationResultIndex == -1 ){
me.elementValidationResults.push(me.validationFromCode(me.ESE_NOT_PK))
-
+
}
}else{
var validationResultIndex = me.elementValidationResults.findIndex(x=> (x.code == me.ESE_NOT_PK))
diff --git a/src/components/designer/es-modeling/panels/AggregateDefinitionPanel.vue b/src/components/designer/es-modeling/panels/AggregateDefinitionPanel.vue
index 26578406..2a7bde7e 100644
--- a/src/components/designer/es-modeling/panels/AggregateDefinitionPanel.vue
+++ b/src/components/designer/es-modeling/panels/AggregateDefinitionPanel.vue
@@ -2,7 +2,7 @@
Examples
-
+
@@ -69,7 +69,7 @@
Method
-
@@ -77,7 +77,7 @@
descriptor.name);
var descriptorName = descriptor ? descriptor.name : undefined;
-
if(me.value.isRestRepository){
var fieldDescriptorsName = 'aggFieldName="value" '
if(me.value && me.relatedAggregateName){
@@ -321,17 +321,29 @@
}
}
- // RestRepository -> Default Verbs
- if(me.value.restRepositoryInfo.method == 'POST'){
- me.commandExample = `http POST localhost:8080/${aggName} ${fieldDescriptorsName}`
- }else if(me.value.restRepositoryInfo.method == 'PATCH'){
- me.commandExample = `http PATCH localhost:8080/${aggName}/1 ${fieldDescriptorsName}`
- }else if(me.value.restRepositoryInfo.method == 'DELETE'){
- me.commandExample = `http DELETE localhost:8080/${aggName}/1`
- }else if(me.value.restRepositoryInfo.method == 'PUT'){
- me.commandExample = `http PUT localhost:8080/${aggName}/1 ${fieldDescriptorsName}`
+ if(me.isOpenAPIPBC){
+ // RestRepository -> Default Verbs
+ if(me.value.restRepositoryInfo.method == 'POST'){
+ me.commandExample = `http POST localhost:8080/${me.value.restRepositoryInfo.apiPath} ${fieldDescriptorsName}`
+ }else if(me.value.restRepositoryInfo.method == 'PATCH'){
+ me.commandExample = `http PATCH localhost:8080/${me.value.restRepositoryInfo.apiPath}/1 ${fieldDescriptorsName}`
+ }else if(me.value.restRepositoryInfo.method == 'DELETE'){
+ me.commandExample = `http DELETE localhost:8080/${me.value.restRepositoryInfo.apiPath}/1`
+ }else if(me.value.restRepositoryInfo.method == 'PUT'){
+ me.commandExample = `http PUT localhost:8080/${me.value.restRepositoryInfo.apiPath}/1 ${fieldDescriptorsName}`
+ }
+ } else {
+ // RestRepository -> Default Verbs
+ if(me.value.restRepositoryInfo.method == 'POST'){
+ me.commandExample = `http POST localhost:8080/${aggName} ${fieldDescriptorsName}`
+ }else if(me.value.restRepositoryInfo.method == 'PATCH'){
+ me.commandExample = `http PATCH localhost:8080/${aggName}/1 ${fieldDescriptorsName}`
+ }else if(me.value.restRepositoryInfo.method == 'DELETE'){
+ me.commandExample = `http DELETE localhost:8080/${aggName}/1`
+ }else if(me.value.restRepositoryInfo.method == 'PUT'){
+ me.commandExample = `http PUT localhost:8080/${aggName}/1 ${fieldDescriptorsName}`
+ }
}
- // var fieldDescriptorsName = 'FieldName'
}else{
var fieldDescriptorsName = 'fieldName="value" '
if(me.value && me.value.fieldDescriptors){
@@ -345,13 +357,21 @@
}
}
- // Controller -> Extend Verb
- if(me.value.controllerInfo.method == 'POST'){
- me.commandExample = `http POST localhost:8080/${pluralize(changeCase.camelCase(me.relatedAggregateName))}`
- }else{
- me.commandExample = `http PUT localhost:8080/${pluralize(changeCase.camelCase(me.relatedAggregateName))}/1/${me.value.controllerInfo.apiPath} ${descriptorName}= "${descriptorName}" ${me.value.controllerInfo.apiPath}=1`
+ if(me.isOpenAPIPBC){
+ if(me.value.controllerInfo.method == 'POST'){
+ me.commandExample = `http POST localhost:8080${me.value.controllerInfo.apiPath} ${fieldDescriptorsName}`
+ }else{
+ me.commandExample = `http PUT localhost:8080${me.value.controllerInfo.apiPath} ${fieldDescriptorsName}`
+ }
+ } else {
+ // Controller -> Extend Verb
+ if(me.value.controllerInfo.method == 'POST'){
+ me.commandExample = `http POST localhost:8080/${pluralize(changeCase.camelCase(me.relatedAggregateName))} ${fieldDescriptorsName}`
+ }else{
+ me.commandExample = `http PUT localhost:8080/${pluralize(changeCase.camelCase(me.relatedAggregateName))}/1/${me.value.controllerInfo.apiPath} ${descriptorName}="{value}"`
+ }
+ me.setApiPath()
}
- me.setApiPath()
}
},
diff --git a/src/components/designer/es-modeling/panels/DomainEventDefinitionPanel.vue b/src/components/designer/es-modeling/panels/DomainEventDefinitionPanel.vue
index 167351af..446dc5e7 100644
--- a/src/components/designer/es-modeling/panels/DomainEventDefinitionPanel.vue
+++ b/src/components/designer/es-modeling/panels/DomainEventDefinitionPanel.vue
@@ -2,7 +2,7 @@
Trigger By LifeCycle
-
+
@@ -135,6 +135,7 @@
name: 'event-panel',
props: {
test:Object,
+ isPBCModel: Boolean,
},
components: {
CommonPanel
@@ -171,7 +172,8 @@
panelInit(){
var me = this
// Element
- me.relatedAggregate = me.canvas.getAttachedAggregate(me.value)
+ // me.relatedAggregate = me.canvas.getAttachedAggregate(me.value)
+ me.relatedAggregate = me.isPBCModel ? me.value.aggregate : me.canvas.getAttachedAggregate(me.value)
me.findCommandLists()
me.findPolicyLists()
me.relatedUrl = 'https://intro-kor.msaez.io/tool/event-storming-tool/#%C2%B7-event-sticker'
@@ -195,7 +197,7 @@
if (coVal) {
if (coVal.isRestRepository) {
me.lifeCycleCommand = coVal.restRepositoryInfo.method
-
+
// Lifecycle 초기 세팅
if(coVal.restRepositoryInfo.method == 'DELETE' && me.value.trigger!='@PostRemove'){
me.value.trigger = '@PreRemove'
@@ -237,7 +239,7 @@
if (coVal) {
me.policyLists.push(coVal)
-
+
}
}
}
diff --git a/src/components/designer/es-modeling/panels/PBCPanel.vue b/src/components/designer/es-modeling/panels/PBCPanel.vue
index 36b13e59..bdfc6661 100644
--- a/src/components/designer/es-modeling/panels/PBCPanel.vue
+++ b/src/components/designer/es-modeling/panels/PBCPanel.vue
@@ -43,7 +43,7 @@
-
+
Selected Model Info
@@ -71,6 +71,49 @@
+
+
+ Select Visibility Element
+
+
+ Read Element
+
+
+
+ Command Element
+
+
+
+ Event Element
+
+
+
+
+
@@ -96,6 +139,9 @@
selectVersion: null,
versions: null,
loading: false,
+ selectedReads: [],
+ selectedCommands: [],
+ selectedEvents: [],
}
},
computed: {
@@ -123,14 +169,18 @@
},
mounted(){},
methods: {
- async panelInit(){
+ async panelInit(){
var me = this
// Element
me.selectVersion = me.value.modelValue.projectVersion
me.versions = await me.getString(`db://definitions/${me.selectedProjectId}/versionLists`)
- await me.migrateVersions(me.selectedProjectId, me.versions);
+ await me.migrateVersions(me.selectedProjectId, me.versions);
+
+ me.selectedReads = me.value.views.filter(item => item && item.visibility == "public")
+ me.selectedCommands = me.value.commands.filter(item => item && item.visibility == "public")
+ me.selectedEvents = me.value.events.filter(item => item && item.visibility == "public")
- // Common
+ // Common
me.$super(EventStormingModelPanel).panelInit()
},
async migrateVersions(projectId, versions){
@@ -161,6 +211,32 @@
var me = this
// Element
+ // IN
+ me.value.views.forEach(function (element, idx) {
+ if(me.selectedReads.find(x=> x && x.elementView.id == element.elementView.id) ) {
+ element.visibility = 'public'
+ } else {
+ element.visibility = 'private'
+ }
+ })
+ me.value.commands.forEach(function (element, idx) {
+ if(me.selectedCommands.find(x=> x && x.elementView.id == element.elementView.id) ) {
+ element.visibility = 'public'
+ } else {
+ element.visibility = 'private'
+ }
+ })
+
+ // Out
+ me.value.events.forEach(function (element, idx) {
+ if(me.selectedEvents.find(x=> x && x.elementView.id == element.elementView.id) ) {
+ element.visibility = 'public'
+ } else {
+ element.visibility = 'private'
+ }
+ })
+
+
// Common
me.$super(EventStormingModelPanel).executeBeforeDestroy()
},
@@ -192,3 +268,12 @@
}
}
+
+
+
diff --git a/src/components/designer/es-modeling/panels/ViewDefinitionPanel.vue b/src/components/designer/es-modeling/panels/ViewDefinitionPanel.vue
index c8a18889..f7e0d253 100644
--- a/src/components/designer/es-modeling/panels/ViewDefinitionPanel.vue
+++ b/src/components/designer/es-modeling/panels/ViewDefinitionPanel.vue
@@ -2,7 +2,7 @@
-
@@ -82,22 +82,22 @@
-
+
-
+
-
+
@@ -108,7 +108,7 @@
-
-
+
+
@@ -128,7 +128,7 @@
@@ -140,13 +140,13 @@
v-model="value"
:createItem="item"
:index="key"
- :isRead="canvas.isReadOnlyModel"
+ :isRead="isReadOnly"
>
-
mdi-plus
@@ -160,14 +160,14 @@
v-model="value"
:updateItem="item"
:index="key"
- :isRead="canvas.isReadOnlyModel"
+ :isRead="isReadOnly"
>
-
mdi-plus
@@ -181,13 +181,13 @@
v-model="value"
:deleteItem="item"
:index="key"
- :isRead="canvas.isReadOnlyModel"
+ :isRead="isReadOnly"
>
-
mdi-plus
@@ -215,7 +215,12 @@
mixins: [EventStormingModelPanel],
name: 'view-panel',
props: {
- generator: Object
+ generator: Object,
+ generateDone: {
+ type: Boolean,
+ required: true
+ },
+ isPBCModel: Boolean,
},
components: {
CommonPanel,
@@ -230,11 +235,8 @@
generator: "CQRSGenerator",
userStory: '',
},
- generateDone: true,
- generateDone: {
- type: Boolean,
- required: true
- },
+ // generateDone: true,
+
}
},
computed: {
@@ -266,7 +268,7 @@
// let model = Object.assign([], parent.value)
- // return{
+ // return{
// description: this.value.description,
// value: this.value,
// model: model,
@@ -287,7 +289,8 @@
panelInit(){
var me = this
// Element
- me.relatedAggregate = me.canvas.getAttachedAggregate(me.value)
+ // me.relatedAggregate = me.canvas.getAttachedAggregate(me.value)
+ me.relatedAggregate = me.isPBCModel ? me.value.aggregate : me.canvas.getAttachedAggregate(me.value)
// Common
me.$super(EventStormingModelPanel).panelInit()// }
@@ -353,14 +356,14 @@
async onGenerationFinished(model){
this.$emit('update:generateDone', true);
this.$EventBus.$emit('generationFinished');
- },
+ },
generate(){
this.executeBeforeDestroy();
-
+
this.generator.generate();
this.state.startTemplateGenerate = true;
this.$emit('update:generateDone', false);
- this.generateDone = false;
+ this.generateDone = false;
},
stop(){
this.generator.stop();
diff --git a/src/components/designer/modeling/CodeGenerator.vue b/src/components/designer/modeling/CodeGenerator.vue
index 38d4e4af..49f94c22 100644
--- a/src/components/designer/modeling/CodeGenerator.vue
+++ b/src/components/designer/modeling/CodeGenerator.vue
@@ -2,20 +2,20 @@
@@ -35,9 +35,9 @@
mdi-refresh
@@ -48,14 +48,14 @@
- {{ openCodeFileName }}
mdi-menu
@@ -90,29 +90,29 @@
gitUsers = val"
- :information="projectInformation"
- :isOnPrem="isOnPrem"
- :projectId="modelingProjectId"
- :projectName="projectName"
- :git-users="gitUsers"
- :isListSettingDone="isGeneratorDone"
- :isOwnModel="isOwnModel"
- :changedPathListsForGit="changedPathListsForGit"
- :generateCodeLists="filteredPrettierCodeLists"
- :ShowCreateRepoTab="ShowCreateRepoTab"
- :isServerModel="isServerModel"
- :projectVersion="projectVersion"
- :githubTokenError="githubTokenError"
- :isOneBCModel="isOneBCModel"
- :onlyOneBcId="onlyOneBcId"
- :isSIgpt="isSIgpt"
+ v-model="value.scm"
+ :editTemplateMode="false"
+ @closeMenu="gitMenu = false"
+ @openIDE="openProjectIDE($event)"
+ @settingDone="ShowCreateRepoTab = false"
+ @closeGitMenu="closeGitMenu"
+ @update:git-users="val => gitUsers = val"
+ :information="projectInformation"
+ :isOnPrem="isOnPrem"
+ :projectId="modelingProjectId"
+ :projectName="projectName"
+ :git-users="gitUsers"
+ :isListSettingDone="isGeneratorDone"
+ :isOwnModel="isOwnModel"
+ :changedPathListsForGit="changedPathListsForGit"
+ :generateCodeLists="filteredPrettierCodeLists"
+ :ShowCreateRepoTab="ShowCreateRepoTab"
+ :isServerModel="isServerModel"
+ :projectVersion="projectVersion"
+ :githubTokenError="githubTokenError"
+ :isOneBCModel="isOneBCModel"
+ :onlyOneBcId="onlyOneBcId"
+ :isSIgpt="isSIgpt"
/>
@@ -151,8 +151,8 @@
mdi-code-braces
@@ -163,9 +163,9 @@
mdi-code-tags-check
mdi-spin mdi-loading
@@ -177,8 +177,8 @@
@@ -208,7 +208,7 @@
@@ -224,7 +224,7 @@
@@ -248,7 +248,7 @@
Toppings
{{ showTopping ? ' mdi-menu-up' : 'mdi-menu-down' }}
@@ -310,7 +310,7 @@
+ v-on="on">
+ v-on="on">
-
+
@@ -733,7 +733,7 @@
-
@@ -789,9 +789,9 @@
@@ -831,20 +831,20 @@
@@ -858,8 +858,8 @@
val.style.color = '#0f7f12'
} -->
{{ item.name }}
-
- Template Explorer
-
- mdi-folder-plus
-
+ Template Explorer
+
+ mdi-folder-plus
+
@@ -901,14 +901,14 @@
{{ platform }}
mdi-file-plus
mdi-folder-plus
@@ -917,19 +917,19 @@
@@ -955,32 +955,32 @@
- {{item.name}}
+
{{item.name}}
-
mdi-pencil
mdi-file-plus
mdi-folder-plus
mdi-delete
@@ -1133,7 +1133,7 @@
mdi-close
@@ -1175,17 +1175,17 @@
mdi-alert-circle-outline
- {{ opennedTemplateFramework[0].templateErrMsg }}
+ {{ opennedTemplateFramework[0].templateErrMsg }}
mdi-alert-circle-outline{{ opennedTemplateFramework[0].templateErrMsg }}
@@ -1208,12 +1208,12 @@
:style="opennedTemplateFramework && opennedTemplateFramework[0].refList && opennedTemplateFramework[0].refList.length > 0 ? 'margin-bottom: -30px;':''"
>
-
@@ -1434,13 +1434,13 @@
@@ -1507,11 +1507,11 @@
-
mdi-check
@@ -1519,9 +1519,9 @@
Template
mdi-check
@@ -1968,7 +1968,7 @@
if(this.reGenerateOnlyModifiedTemplate){
this.setTemplateFramework(this.opennedTemplateFramework)
}
-
+
this.isLoadingExpectedTemplate = true
if((this.openCode && this.openCode[0]) || this.value.basePlatform){
var platform = this.openCode && this.openCode[0] ? this.openCode[0].template : this.value.basePlatform
@@ -2175,7 +2175,7 @@
var getCodePath = localStorage.getItem('openCodePath')
if (getCodePath) {
me.openCode[0] = me.codeLists.find(x => x.fullPath == getCodePath)
- }
+ }
}
//done
if (me.openCode.length > 0 && me.openCode[0]) {
@@ -2187,7 +2187,7 @@
setTimeout(()=>{ //TODO: temporal
me.openCode[0].code = me.codeAlign(me.openCode[0].code)
}, 0)
-
+
}
return me.openCode
}
@@ -2653,11 +2653,11 @@
this.tempToppingPlatforms.push('isVanillaK8s')
}
if(this.value){
- if(this.value.toppingPlatforms && !this.value.toppingPlatforms.find(x => x === "isVanillaK8s")){
- this.value.toppingPlatforms.push('isVanillaK8s')
- }
+ if(this.value.toppingPlatforms && !this.value.toppingPlatforms.find(x => x === "isVanillaK8s")){
+ this.value.toppingPlatforms.push('isVanillaK8s')
+ }
}
-
+
this.openCodeGenerator()
// this.settingGithub()
// this.onLoadInitTemplate();
@@ -2670,7 +2670,7 @@
window.removeEventListener("message", me.messageProcessing);
this.closeCodeViewer()
},
- mounted: function () {
+ mounted: function () {
var me = this
window.addEventListener("message", me.messageProcessing);
@@ -2773,9 +2773,9 @@
me.isSIgpt = false
},
isRootFolder(item){
- if(this.projectInformation
- && this.projectInformation.firstCommit == 'false'
- && this.rootModelAndElementMap.modelForElements.BoundedContext.find(x => x.name == item.name)){
+ if(this.projectInformation
+ && this.projectInformation.firstCommit == 'false'
+ && this.rootModelAndElementMap.modelForElements.BoundedContext.find(x => x.name == item.name)){
return true;
} else {
return false;
@@ -2844,11 +2844,11 @@ jobs:
me.templateMetaData = YAML.parse(me.templateFrameWorkList[template]['.template/metadata.yml'].content)
me.templateMetaData.testModel = me.templateMetaData.testModel.replace('storming/', '')
me.templateMetaData.testModel = me.templateMetaData.testModel.replaceAll('/', '')
-
+
me.existOnlyExpected = []
me.existOnlyActual = []
me.diffList = []
-
+
var diffFile
Object.keys(me.templateFrameWorkList[template]).forEach(function (key){
if(key.includes('.template/')){
@@ -2866,21 +2866,21 @@ jobs:
}
}
})
-
+
me.codeLists.forEach(function (file){
diffFile = me.templateFrameWorkList[template][`.template/test/expected/${file.fullPath.replace(`${me.modelingProjectId}/`, `${me.templateMetaData.testModel}/`)}`]
if(!diffFile){
me.existOnlyActual.push(file.fullPath)
// '.template/test/expected/frontend/src/components/주문주문.vue'
// '.template/test/expected/frontend/src/components/주문주문.vue'
- }
+ }
})
if(me.diffList.length > 0 || me.existOnlyExpected.length > 0 || me.existOnlyActual.length > 0){
me.openExpectedTemplateTestDialog = true
} else {
alert("Every files are identical")
}
-
+
me.startCheckDiff = false
}
@@ -2904,7 +2904,7 @@ jobs:
} else {
if(key == pathList[roofNumber]){
if(key == pathList[pathList.length - 1]){
- modelData[key] = me.currentModelData.value
+ modelData[key] = me.currentModelData.value
} else {
// console.log(key)
roofNumber++;
@@ -2913,7 +2913,7 @@ jobs:
}
}
})
- },
+ },
setSelectedTempTreePath(item){
if(item && item.currentPath && item.platform){
this.selectedTempTreePath[item.platform] = item.currentPath
@@ -2963,9 +2963,9 @@ jobs:
} else if(mode == 'edit'){
this.selectedTreeItem.newName = this.selectedTreeItem.name
}
- },
+ },
editTreeItem(){
- var me = this
+ var me = this
// console.log(me.selectedTreeItem)
if(me.selectedTreeItem.editMode.includes('add')){
if(me.selectedTreeItem.editMode == 'add New'){
@@ -2995,7 +2995,7 @@ jobs:
if(!me.templateFrameWorkList[obj.platform]){
me.templateFrameWorkList[obj.platform] = {}
}
-
+
me.editTemplateFrameWorkList[obj.platform][obj.currentPath] = {
code: "// new",
element: [
@@ -3010,7 +3010,7 @@ jobs:
}
} else if(me.selectedTreeItem.editMode == 'add folder'){
obj.children = []
- }
+ }
if(me.selectedTreeItem.isNew){
me.templateTreeList[me.selectedTreeItem.platform].push(obj)
} else {
@@ -3046,10 +3046,10 @@ jobs:
}
}
- if(me.selectedTreeItem.editMode == 'edit' || me.selectedTreeItem.editMode == 'delete'){
+ if(me.selectedTreeItem.editMode == 'edit' || me.selectedTreeItem.editMode == 'delete'){
me.selectedTreeItem.computedFileName = me.selectedTreeItem.name,
- me.selectedTreeItem.computedSubFileName = me.selectedTreeItem.currentPath.replace(me.selectedTreeItem.name, "")
-
+ me.selectedTreeItem.computedSubFileName = me.selectedTreeItem.currentPath.replace(me.selectedTreeItem.name, "")
+
me.editTemplateFrameWorkList[me.selectedTreeItem.platform][me.selectedTreeItem.currentPath] = {
code: me.selectedTreeItem.code,
element: [
@@ -3090,7 +3090,7 @@ jobs:
if(this.treePathList[item.id]){
this.currentModelData.subPath = this.treePathList[item.id].replace(item.name.replace(": ", ""), "")
}
- },
+ },
fetchChildren(obj){
var me = this
var data = me.modelData
@@ -3153,23 +3153,23 @@ jobs:
var content
var startGen = false
// if(prompt == "autoGen"){
- Object.keys(modifiedValueList).forEach(function (key){
- if(modifiedValueList[key] != {}){
- Object.keys(modifiedValueList[key]).forEach(function (val){
- let path = modifiedValueList[key][val]
- let value = val
- me.convertStringToObj(path, value);
- })
- }
- })
- var CircularJSON = require('circular-json');
- var str = CircularJSON.stringify(me.convertedObj);
+ Object.keys(modifiedValueList).forEach(function (key){
+ if(modifiedValueList[key] != {}){
+ Object.keys(modifiedValueList[key]).forEach(function (val){
+ let path = modifiedValueList[key][val]
+ let value = val
+ me.convertStringToObj(path, value);
+ })
+ }
+ })
+ var CircularJSON = require('circular-json');
+ var str = CircularJSON.stringify(me.convertedObj);
- content = `If I have this model in json: ${str}
- I want to make a mustache template that generating following source code:`
+ content = `If I have this model in json: ${str}
+ I want to make a mustache template that generating following source code:`
+ me.originMustacheTemplate[0].code
- startGen = true
+ startGen = true
// } else {
// if(prompt != '' && prompt != null){
// console.log(prompt)
@@ -3183,7 +3183,7 @@ jobs:
model: "text-davinci-003",
prompt: content,
temperature: 0.5,
- max_tokens: tokenLength ? tokenLength : 3000,
+ max_tokens: tokenLength ? tokenLength : 3000,
}
let header = {
Authorization: `Bearer ${me.openaiToken}`,
@@ -3191,22 +3191,22 @@ jobs:
}
let respones = await axios.post(`https://api.openai.com/v1/completions`, data, { headers: header })
- .catch(function (error) {
- me.startGenerateUseOpenAI = false
- if(error.response && error.response.data && error.response.data.message){
- var errText = error.response.data.message
- if(error.response.data.errors && error.response.data.errors[0] && error.response.data.errors[0].message){
- errText = errText + ', ' + error.response.data.errors[0].message
+ .catch(function (error) {
+ me.startGenerateUseOpenAI = false
+ if(error.response && error.response.data && error.response.data.message){
+ var errText = error.response.data.message
+ if(error.response.data.errors && error.response.data.errors[0] && error.response.data.errors[0].message){
+ errText = errText + ', ' + error.response.data.errors[0].message
+ }
+ alert(errText)
+ } else {
+ alert(error.message)
}
- alert(errText)
- } else {
- alert(error.message)
- }
- });
+ });
if(respones.data.choices[0].text){
// if(prompt == "autoGen"){
- me.modifiedMustacheTemplate[0].code = respones.data.choices[0].text
- me.startGenerateUseOpenAI = false
+ me.modifiedMustacheTemplate[0].code = respones.data.choices[0].text
+ me.startGenerateUseOpenAI = false
// } else {
// // console.log(respones.data.choices[0].text)
// me.openAiResult = me.codeAlign(respones.data.choices[0].text)
@@ -3286,7 +3286,7 @@ jobs:
},
closeGitMenu(){
var me = this
- me.githubTokenError = false
+ me.githubTokenError = false
},
reGenerateTemplateCode(){
var me = this
@@ -3337,13 +3337,13 @@ jobs:
let filePath
if(me.opennedTemplateFramework[0].fullPath){
filePath = me.opennedTemplateFramework[0].fullPath
- }
+ }
if(me.opennedTemplateFramework[0].refList && me.opennedTemplateFramework[0].refList.length > 0){
if(!filePath || !me.opennedTemplateFramework[0].refList.find(x => x == filePath)){
filePath = me.opennedTemplateFramework[0].refList[0]
}
- }
-
+ }
+
return filePath
},
setTemplateResult(ref){
@@ -3374,7 +3374,7 @@ jobs:
// if(me.editTemplateFrameWorkList[platform][tempPath] && me.editTemplateFrameWorkList[platform][tempPath].elementResult && me.editTemplateFrameWorkList[platform][tempPath].elementResult.fullPath == ref){
// opennedReferenceFile = me.editTemplateFrameWorkList[platform][tempPath].elementResult
// }
-
+
if(!opennedReferenceFile || opennedReferenceFile.code == ""){
if(!opennedReferenceFile){
opennedReferenceFile = me.filteredPrettierCodeLists.find(x => x.fullPath == ref)
@@ -3416,21 +3416,21 @@ jobs:
}
}
}
-
-
+
+
if(opennedReferenceFile){
if(me.templateFrameWorkList[platform][tempPath] && me.templateFrameWorkList[platform][tempPath].refList){
opennedReferenceFile.refList = me.templateFrameWorkList[platform][tempPath].refList
}
me.openCode[0] = opennedReferenceFile
-
+
if(opennedReferenceFile){
var obj = null
if(tempPath.includes('for-model/')){
obj = me.rootModelAndElementMap.rootModel
} else if(me.modelForElement[platform] && me.modelForElement[platform][tempPath] && me.modelForElement[platform][tempPath][filePath]){
obj = me.modelForElement[platform][tempPath][filePath]
- }
+ }
if(!obj){
obj = me.rootModelAndElementMap.rootModel
@@ -3519,7 +3519,7 @@ jobs:
},
setTemplateTreeList(){
var me = this
- me.templateTreeList = {}
+ me.templateTreeList = {}
let editTemplateFrameWorkList = {}
Object.keys(me.templateFrameWorkList).forEach(function (platform){
@@ -3534,14 +3534,14 @@ jobs:
Object.keys(lists).forEach(function (key){
if(!lists[key].isDeleted){
// var currentFolder = treeLists;
- var currentFolder = me.templateTreeList[platform];
+ var currentFolder = me.templateTreeList[platform];
var currentPath = "";
-
+
key.split('/').forEach(fileName => {
currentPath = currentPath + "/" + fileName;
-
+
var isFolder = !(("/" + key) === currentPath);
-
+
var fileObj = currentFolder.find(x => x.name === fileName.trim());
if(!fileObj){
var fileType = me.fileType(fileName)
@@ -3554,7 +3554,7 @@ jobs:
path: key,
currentPath: currentPath.replace('/', ''),
};
-
+
currentFolder.push(fileObj);
}
currentFolder = fileObj.children;
@@ -4114,7 +4114,7 @@ jobs:
var set = new Set();
var option = option
-
+
root.forEach((item) => {
if(Array.isArray(item.children)) {
me._collectSelectedFileContents(item.children, codeBag, option);
@@ -4165,7 +4165,7 @@ jobs:
return false
}else if(onOff == 'contents'){
this.searchForContent.onOff = true
- this.searchForContents()
+ this.searchForContents()
return false
}
},
@@ -4307,7 +4307,7 @@ jobs:
try {
var moreHintMode = false
if(id == '2'){
- moreHintMode = true
+ moreHintMode = true
}
if(moreHintMode){
var inputSwitch
@@ -4325,7 +4325,7 @@ jobs:
}
})
}
- }
+ }
})
}
if(me.openaiToken){
@@ -4335,7 +4335,7 @@ jobs:
} else {
content = me.filteredOpenCode[0].code
}
-
+
var splitContent = null
var promptValue = []
var suffixValue = []
@@ -4349,53 +4349,53 @@ jobs:
})
promptValue = promptValue.join("\n")
suffixValue = suffixValue.join("\n")
-
+
let tokenLength
if(moreHintMode){
tokenLength = 4092 - Math.round(`${content}\n${testA.join('\n')}`.length/3.5)
- }
+ }
let data = {
model: "text-davinci-003",
prompt: promptValue,
suffix: moreHintMode ? `${suffixValue}\n${testA.join('\n')}` : suffixValue,
temperature: 0.5,
- max_tokens: moreHintMode ? tokenLength : 3000,
+ max_tokens: moreHintMode ? tokenLength : 3000,
}
let header = {
Authorization: `Bearer ${me.openaiToken}`,
'Content-Type': 'application/json'
}
-
+
let respones = await axios.post(`https://api.openai.com/v1/completions`, data, { headers: header })
- .catch(function (error) {
- me.startGenerate = false
- if(me.openaiContent){
- me.filteredOpenCode[0].code = me.openaiContent
- }
- if(error.response && error.response.data && error.response.data.message){
- var errText = error.response.data.message
- if(error.response.data.errors && error.response.data.errors[0] && error.response.data.errors[0].message){
- errText = errText + ', ' + error.response.data.errors[0].message
+ .catch(function (error) {
+ me.startGenerate = false
+ if(me.openaiContent){
+ me.filteredOpenCode[0].code = me.openaiContent
}
- alert(errText)
- } else {
- alert(error.message)
- }
- });
+ if(error.response && error.response.data && error.response.data.message){
+ var errText = error.response.data.message
+ if(error.response.data.errors && error.response.data.errors[0] && error.response.data.errors[0].message){
+ errText = errText + ', ' + error.response.data.errors[0].message
+ }
+ alert(errText)
+ } else {
+ alert(error.message)
+ }
+ });
if(respones && !me.stopAutoGenerate){
if(respones.data.choices[0].text){
var autoGenerateResult = promptValue + respones.data.choices[0].text + suffixValue
me.autoGenerateResponse = autoGenerateResult
-
+
me.changedDiffCodeViewer = true
me.changedDiffCode = JSON.parse(JSON.stringify(me.filteredOpenCode))
me.changedDiffCode[0].code = content
me.filteredOpenCode[0].code = me.autoGenerateResponse
-
+
localStorage.setItem('openaiToken', me.openaiToken)
me.startGenerate = false
-
+
me.setAutoGenerateCodetoList = JSON.parse(JSON.stringify(me.codeLists))
me.setAutoGenerateCodetoList.some(function (element, index){
if(me.filteredOpenCode[0].path == element.fullPath){
@@ -4403,13 +4403,13 @@ jobs:
return true;
}
})
-
+
me.refreshCallGenerate();
}
} else {
me.stopAutoGenerate = false
}
-
+
} else {
me.stopAutoGenerate = false
alert("input Token")
@@ -4426,7 +4426,7 @@ jobs:
var me = this
var convertModelData = convertModelData ? convertModelData:{}
me.recursiveCount++;
- for (let key in modelData) {
+ for (let key in modelData) {
if (typeof modelData[key] === "string") {
var beforePath = path ? path + '.' : ''
convertModelData[beforePath + key] = modelData[key]
@@ -4442,7 +4442,7 @@ jobs:
convertModelData[beforePath + key] = null
}
}
- me.recursiveCount--;
+ me.recursiveCount--;
if(me.recursiveCount == 0) {
var modifiedValueList = {}
@@ -4450,13 +4450,13 @@ jobs:
var content = me.originMustacheTemplate[0].code.split('\n')
const reg = /[\{\}\[\]\/?.,;:|\)*~`!^\-+<>@\#$%&\\\=\(\'\"]/gi;
let isAnnotation = false
- let dataIncludeUnderBar
- let replacedData
+ let dataIncludeUnderBar
+ let replacedData
content.forEach(function (code, idx){
if(code.includes('/**')){
isAnnotation = true
- }
+ }
if(code.includes('*/')){
isAnnotation = false
}
@@ -4470,10 +4470,10 @@ jobs:
// const tokens1 = new Set(code1.match(regex));
// const tokens2 = new Set(code2.match(regex));
-
+
// const intersection = new Set([...tokens1].filter(x => tokens2.has(x)));
// const overlap = intersection.size / Math.min(tokens1.size, tokens2.size);
-
+
// isOverlap = overlap >= threshold;
modifiedValueList[idx] = {}
@@ -4491,7 +4491,7 @@ jobs:
if(data.includes("_")){
dataIncludeUnderBar = data.split("_")
replacedData = dataIncludeUnderBar[0]
- }
+ }
if(data.includes('()')){
replacedData = data.replace('on', '')
}
@@ -4501,13 +4501,13 @@ jobs:
if(data.replaceAll(reg, '') == convertModelData[key] || (replacedData && replacedData.replaceAll(reg, '') == convertModelData[key])){
var originValuePriority = splitSpace[index].replaceAll(/.[0-9]./g, ".*.").split(".*.")
var changeValuePriority = key.replaceAll(/.[0-9]./g, ".*.").split(".*.")
-
+
if(firstGenerate || originValuePriority.length >= changeValuePriority.length){
var isValueUpdate = true
if(!firstGenerate && originValuePriority.length == changeValuePriority.length){
if(splitSpace[index].length < key.length){
isValueUpdate = false
- }
+ }
}
if(isValueUpdate){
@@ -4520,7 +4520,7 @@ jobs:
modifiedValueList[idx][convertModelData[key]] = key
firstGenerate = false
}
- }
+ }
}
}
})
@@ -4561,7 +4561,7 @@ jobs:
content.forEach(function (line, lineNumber){
if(line.includes('/**')){
isAnnotation = true
- }
+ }
if(line.includes('*/')){
isAnnotation = false
}
@@ -4579,28 +4579,28 @@ jobs:
isModeLine = false
var token = line.replaceAll("{{", "")
token = token.replaceAll("}}", "")
-
+
if(token.includes("{") && !token.includes(" class ")){
isMethod = true
if(content[idx - 1].includes("@")){
isModeLine = true
}
- }
+ }
if(token.includes("}")){
isMethod = false
- }
-
+ }
+
text = text ? text + '\n' + line : line
-
- if(isModeLine){
+
+ if(isModeLine){
var mode = content[idx - 1].split("@")
testArr[testArr.length - 1] = content[idx - 1].replace(mode[1], "mode")
}
-
+
if(!isMethod){
testArr.push(text)
text = null
- }
+ }
}
})
@@ -4650,9 +4650,9 @@ jobs:
const uniqueArrText = [...setText];
const setEndText = new Set(endText.split('\n'));
const uniqueArrEndText = [...setEndText];
-
+
loopCount = 0
- space = null
+ space = null
uniqueArrText.forEach(function (line, lineIdx){
while(loopCount == lineIdx){
space = space ? space + " " : " "
@@ -4663,7 +4663,7 @@ jobs:
})
uniqueArr[idx] = uniqueArrText.join('\n') + valueName + uniqueArrEndText.join('\n')
}
- })
+ })
}
})
me.modifiedMustacheTemplate[0].code = uniqueArr.join("\n")
@@ -4675,7 +4675,7 @@ jobs:
},
convertStringToObj(path, value) {
- var me = this
+ var me = this
var container = me.convertedObj;
path.split('.').map((k, i, values) => {
container = (container[k] = (i == values.length - 1 ? value : (container[k] ? container[k]:{})))
@@ -4705,15 +4705,15 @@ jobs:
let me = this
return new Promise(async function (resolve, reject) {
let result = await me.gitAPI.getFile("topping-isVanillaK8s", "msa-ez", "for-model/kubernetes/docs/common/Pod.md")
- .then(function (obj) {
- resolve(obj.data)
- })
- .catch(e => {
- if(e.response.status === 401){
- me.alertReLogin()
- }
- alert(e)
- })
+ .then(function (obj) {
+ resolve(obj.data)
+ })
+ .catch(e => {
+ if(e.response.status === 401){
+ me.alertReLogin()
+ }
+ alert(e)
+ })
})
},
async initHandleBars(handleBars){
@@ -4736,27 +4736,27 @@ jobs:
if(map.if && map.if.includes(value)){
return map.then;
}
-
+
if(map.default)
- return map.default
+ return map.default
}
return '';
-
+
})
window.$HandleBars.registerHelper('checkVO', function (className, options) {
- if(className.endsWith("Address") || className.endsWith("Photo") || className.endsWith("User") || className.endsWith("Email")
- || className.endsWith("Payment") || className.endsWith("Money") || className.endsWith("Weather") || className.endsWith("Rating")
- || className.endsWith("Likes")|| className.endsWith("Tags")|| className.endsWith("Comment") ){
+ if(className.endsWith("Address") || className.endsWith("Photo") || className.endsWith("User") || className.endsWith("Email")
+ || className.endsWith("Payment") || className.endsWith("Money") || className.endsWith("Weather") || className.endsWith("Rating")
+ || className.endsWith("Likes")|| className.endsWith("Tags")|| className.endsWith("Comment") ){
return options.fn(this);
}
})
window.$HandleBars.registerHelper('checkEntityMember', function (className, options) {
- if(!(className.endsWith("Address") || className.endsWith("Photo") || className.endsWith("User") || className.endsWith("Email")
- || className.endsWith("Payment") || className.endsWith("Money") || className.endsWith("Weather") || className.endsWith("Rating"))
- || className.endsWith("Likes")|| className.endsWith("Tags")|| className.endsWith("Comment") && className.indexOf("java.") == -1 && className.indexOf("List") == -1){
+ if(!(className.endsWith("Address") || className.endsWith("Photo") || className.endsWith("User") || className.endsWith("Email")
+ || className.endsWith("Payment") || className.endsWith("Money") || className.endsWith("Weather") || className.endsWith("Rating"))
+ || className.endsWith("Likes")|| className.endsWith("Tags")|| className.endsWith("Comment") && className.indexOf("java.") == -1 && className.indexOf("List") == -1){
return options.fn(this);
} else {
return options.inverse(this);
@@ -4857,10 +4857,10 @@ jobs:
});
window.$HandleBars.registerHelper('attached', function (type, value, options) {
-
+
let attachedElementsInTheType
-
+
if(value.attached)
attachedElementsInTheType = value.attached.filter(
element => (element._type.endsWith(type) || (type=='ReadModel' && element._type.endsWith('View')))
@@ -4879,7 +4879,7 @@ jobs:
});
-
+
window.$HandleBars.registerHelper('attachedOrIncoming', function (type, value, options) {
var attachedElements = window.$HandleBars.helpers.attached(type, value, options)
var incomingElements = window.$HandleBars.helpers.incoming(type, value, options)
@@ -4902,9 +4902,9 @@ jobs:
window.$HandleBars.registerHelper('reaching', function (type, value, options) {
let result = "";
-
+
var attachedOrOutgoing = window.$HandleBars.helpers.attachedOrOutgoing(type, value, options)
-
+
if(attachedOrOutgoing==""){
var attachedElements
attachedElements = value.attached.filter(
@@ -5186,45 +5186,45 @@ jobs:
// if(isCustom){
// me.showTopping = true
// }else{
- // // init
- // me.selectedVersion = 'java8'
- // me.isVanillaK8s = false
- // me.isJava15 = false
- // me.selectedSecurity = null
- // me.isSpringSecurity = false
- // me.isKeycloakSecurity = false
- // me.isServiceMesh = false
- // me.isRollout = false
- // me.isIngress = false
- // me.isApolloGraphQL = false
- // me.isJavaGraphQL = false
- //
- // if(me.tempToppingPlatforms.length > 0 ){
- // me.tempToppingPlatforms.forEach(function(toppingPlatform){
- // if(toppingPlatform =="apollo-graphql"){
- // me.isApolloGraphQL = true
- // } else if(toppingPlatform=="spring-security"){
- // me.selectedSecurity = "isSpringSecurity"
- // me.isKeycloakSecurity = false
- // me.isSpringSecurity = true
- // } else if(toppingPlatform=="keycloak-security"){
- // me.selectedSecurity = "isKeycloakSecurity"
- // me.isKeycloakSecurity = true
- // me.isSpringSecurity = false
- // } else if(toppingPlatform=="argo"){
- // me.isRollout = true
- // } else if(toppingPlatform=="istio"){
- // me.isServiceMesh = true
- // } else if(toppingPlatform=="ingress"){
- // me.isIngress = true
- // } else if(toppingPlatform=="java15"){
- // me.selectedVersion = "java15"
- // } else if(toppingPlatform=="isVanillaK8s"){
- // me.isVanillaK8s = true
- // }
- // })
- // }
- // me.showTopping = true
+ // // init
+ // me.selectedVersion = 'java8'
+ // me.isVanillaK8s = false
+ // me.isJava15 = false
+ // me.selectedSecurity = null
+ // me.isSpringSecurity = false
+ // me.isKeycloakSecurity = false
+ // me.isServiceMesh = false
+ // me.isRollout = false
+ // me.isIngress = false
+ // me.isApolloGraphQL = false
+ // me.isJavaGraphQL = false
+ //
+ // if(me.tempToppingPlatforms.length > 0 ){
+ // me.tempToppingPlatforms.forEach(function(toppingPlatform){
+ // if(toppingPlatform =="apollo-graphql"){
+ // me.isApolloGraphQL = true
+ // } else if(toppingPlatform=="spring-security"){
+ // me.selectedSecurity = "isSpringSecurity"
+ // me.isKeycloakSecurity = false
+ // me.isSpringSecurity = true
+ // } else if(toppingPlatform=="keycloak-security"){
+ // me.selectedSecurity = "isKeycloakSecurity"
+ // me.isKeycloakSecurity = true
+ // me.isSpringSecurity = false
+ // } else if(toppingPlatform=="argo"){
+ // me.isRollout = true
+ // } else if(toppingPlatform=="istio"){
+ // me.isServiceMesh = true
+ // } else if(toppingPlatform=="ingress"){
+ // me.isIngress = true
+ // } else if(toppingPlatform=="java15"){
+ // me.selectedVersion = "java15"
+ // } else if(toppingPlatform=="isVanillaK8s"){
+ // me.isVanillaK8s = true
+ // }
+ // })
+ // }
+ // me.showTopping = true
// }
},
// openForkedRepo(gitPath){
@@ -5324,7 +5324,7 @@ jobs:
me.openCode = item
}
}
-
+
if(item && item.length > 0){
me.templateResultPath = null
if(item[0].eleKeys){
@@ -5335,14 +5335,14 @@ jobs:
let tempPath = me.getTempPath();
// let filePath = me.getFilePath();
-
+
if(me.editTemplateFrameWorkList[platform] && me.editTemplateFrameWorkList[platform][tempPath]){
me.opennedTemplateFramework[0].code = me.editTemplateFrameWorkList[platform][tempPath].code
} else {
if(me.templateFrameWorkList[platform] && me.templateFrameWorkList[platform][tempPath]){
me.opennedTemplateFramework[0].code = me.templateFrameWorkList[platform][tempPath].content
- }
- }
+ }
+ }
if(me.templateFrameWorkList[platform] && me.templateFrameWorkList[platform][tempPath] && me.templateFrameWorkList[platform][tempPath].refList){
me.opennedTemplateFramework[0].refList = me.templateFrameWorkList[platform][tempPath].refList
if(me.openCode && me.openCode[0] && me.openCode[0].fullPath && me.opennedTemplateFramework[0].refList.find(x => x == me.openCode[0].fullPath)){
@@ -5367,7 +5367,7 @@ jobs:
// }
// }
}
-
+
me.setTemplateFileName(platform, tempPath)
if(!me.reGenerateOnlyModifiedTemplate){
me.setTemplateResult(me.templateResultPath)
@@ -5649,41 +5649,41 @@ jobs:
me.$manifestsPerTemplate[templateUrl] = [];
let org = templateUrl.split('/')[templateUrl.split('/').length - 2].trim()
let repo = templateUrl.split('/')[templateUrl.split('/').length - 1].trim()
-
+
// Template은 Main Branch에서 받아오도록 처리
let commitRes = await me.gitAPI.getCommit(org, repo, "main")
- .then(async function (res) {
- // Commit List 받아오는 것.
- let tree = await me.gitAPI.getTree(org, repo, res)
- .then(async function (list) {
- // console.log("try me.gitAPI.setGitList()")
- let gitList = await me.gitAPI.setGitList(list, repo, templateUrl)
- .then(function (resultLists) {
- // console.log(resultLists)
- Object.assign(me.$manifestsPerBaseTemplate, resultLists.manifestsPerBaseTemplate)
- me.$manifestsPerTemplate[templateUrl] = resultLists.manifestsPerTemplate[templateUrl]
- me.templateFrameWorkList = resultLists.templateFrameWorkList
- resolve()
- })
- .catch(e => {
- console.log(e)
- })
+ .then(async function (res) {
+ // Commit List 받아오는 것.
+ let tree = await me.gitAPI.getTree(org, repo, res)
+ .then(async function (list) {
+ // console.log("try me.gitAPI.setGitList()")
+ let gitList = await me.gitAPI.setGitList(list, repo, templateUrl)
+ .then(function (resultLists) {
+ // console.log(resultLists)
+ Object.assign(me.$manifestsPerBaseTemplate, resultLists.manifestsPerBaseTemplate)
+ me.$manifestsPerTemplate[templateUrl] = resultLists.manifestsPerTemplate[templateUrl]
+ me.templateFrameWorkList = resultLists.templateFrameWorkList
+ resolve()
+ })
+ .catch(e => {
+ console.log(e)
+ })
+ })
+ .catch(e => {
+ console.log(e)
+ if(e.response.status === 401){
+ me.alertReLogin()
+ }
+ alert(e)
+ })
})
- .catch(e => {
- console.log(e)
- if(e.response.status === 401){
+ .catch(error => {
+ console.log(error)
+ if(error.response.status === 401){
me.alertReLogin()
}
- alert(e)
+ alert(error)
})
- })
- .catch(error => {
- console.log(error)
- if(error.response.status === 401){
- me.alertReLogin()
- }
- alert(error)
- })
} catch (e) {
console.log(`Error] Load Git Template: ${e}`)
if(e.response.data.message.includes("Bad credentials")){
@@ -5713,7 +5713,7 @@ jobs:
// // me.$manifest... => pathList 정의
// // template Code List => { $path: $code}
// return new Promise(async (resolve, reject) => {
-
+
// });
// },
async setToppingList(template) {
@@ -5738,37 +5738,37 @@ jobs:
}
// console.log(repo,)
let commitRes = await me.gitAPI.getCommit(org, repo, "main")
- .then(async function (res) {
- // Commit List 받아오는 것.
- let tree = await me.gitAPI.getTree(org, repo, res)
- .then(async function (list) {
- // console.log("try me.gitAPI.setGitList() - " + fullUrl)
- let gitList = await me.gitAPI.setGitList(list, toppingName, fullUrl)
- .then(function (resultLists) {
- me.$manifestsPerToppings[fullUrl] = resultLists.manifestsPerToppings[fullUrl]
- Object.assign(me.gitToppingList, resultLists.gitToppingList)
- // me.gitToppingList = resultLists.gitToppingList
- resolve()
- })
- .catch(e => {
- console.log(e)
- })
+ .then(async function (res) {
+ // Commit List 받아오는 것.
+ let tree = await me.gitAPI.getTree(org, repo, res)
+ .then(async function (list) {
+ // console.log("try me.gitAPI.setGitList() - " + fullUrl)
+ let gitList = await me.gitAPI.setGitList(list, toppingName, fullUrl)
+ .then(function (resultLists) {
+ me.$manifestsPerToppings[fullUrl] = resultLists.manifestsPerToppings[fullUrl]
+ Object.assign(me.gitToppingList, resultLists.gitToppingList)
+ // me.gitToppingList = resultLists.gitToppingList
+ resolve()
+ })
+ .catch(e => {
+ console.log(e)
+ })
+ })
+ .catch(e => {
+ console.log(e)
+ if(e.response.status === 401){
+ me.alertReLogin()
+ }
+ alert(e)
+ })
})
- .catch(e => {
- console.log(e)
- if(e.response.status === 401){
+ .catch(error => {
+ console.log(error)
+ if(error.response.status === 401){
me.alertReLogin()
}
- alert(e)
+ alert(error)
})
- })
- .catch(error => {
- console.log(error)
- if(error.response.status === 401){
- me.alertReLogin()
- }
- alert(error)
- })
} catch (e) {
console.log(`Error] Load Git Template: ${e}`)
if(e.response.data.message.includes("Bad credentials")){
@@ -6033,7 +6033,7 @@ jobs:
if (i === keys.length - 1) {
currentObj[key] = value;
- } else {
+ } else {
if (!currentObj[key]) {
currentObj[key] = {};
}
@@ -6838,7 +6838,7 @@ jobs:
},
isChangedCode(codeItem) {
var me = this
-
+
if (!codeItem) {
return false
}
@@ -6877,7 +6877,7 @@ jobs:
try {
if (newVal && newVal.length > 0) {
-
+
if (me.changedPathLists && me.changedPathLists.length > 0) {
var findIdx = me.changedPathLists.indexOf(newVal[0].path)
@@ -6920,9 +6920,9 @@ jobs:
if (newValObj && newValObj.path.includes('.java')) {
- ////// TODO : performance problem
+ ////// TODO : performance problem
setTimeout(()=>{newValObj.code = me.codeAlign(newValObj.code)}, 0)
-
+
}
me.openCode = newVal
@@ -7050,16 +7050,21 @@ jobs:
for(let pbc of pbcLists){
let config = pbc.modelValue;
- if( config.projectId && config.projectVersion ){
- let modelVerInfo = await me.list(`db://definitions/${config.projectId}/versionLists/${config.projectVersion}`);
- let modelVerValue = {'elements': {}, 'relations': {}};
+ if( config.openAPI ){
+ //open API
- if(modelVerInfo && modelVerInfo.valueUrl){
- modelVerValue = await me.getObject(`storage://${modelVerInfo.valueUrl}`);
- } else {
- modelVerValue = modelVerInfo.versionValue ? JSON.parse(modelVerInfo.versionValue.value) : {'elements': {}, 'relations': {}};;
+ } else {
+ if( config.projectId && config.projectVersion ){
+ let modelVerInfo = await me.list(`db://definitions/${config.projectId}/versionLists/${config.projectVersion}`);
+ let modelVerValue = {'elements': {}, 'relations': {}};
+
+ if(modelVerInfo && modelVerInfo.valueUrl){
+ modelVerValue = await me.getObject(`storage://${modelVerInfo.valueUrl}`);
+ } else {
+ modelVerValue = modelVerInfo.versionValue ? JSON.parse(modelVerInfo.versionValue.value) : {'elements': {}, 'relations': {}};;
+ }
+ await callPBC(modelVerValue, modelVerInfo);
}
- await callPBC(modelVerValue, modelVerInfo);
}
}
}
@@ -7342,7 +7347,7 @@ jobs:
}
})
},
-
+
convertNameForElement(item){
item.namePascalCase = changeCase.pascalCase(item.name)
item.nameCamelCase = changeCase.camelCase(item.name)
@@ -7482,10 +7487,10 @@ jobs:
};
Promise.all([me.generateBaseTemplate(templateContext), me.generateTemplate(templateContext)])
- .then(async function () {
- await me.generateToppingTemplate(templateContext)
- resolve()
- });
+ .then(async function () {
+ await me.generateToppingTemplate(templateContext)
+ resolve()
+ });
} catch (e) {
// me.isListSettingDone = true
@@ -7574,7 +7579,7 @@ jobs:
if((localStorage.getItem("loginType") && localStorage.getItem("loginType") == "github") || me.gitAccessToken) {
// var loadTemplate = localStorage.getItem(me.selectedBaseTemplate)
// var loadTemplate = me.templateFrameWorkList[basePlatform]
-
+
var platformFullName = basePlatform
if(!platformFullName.includes("http")){
platformFullName = await me.gitAPI.getTemplateURL(basePlatform)
@@ -7799,7 +7804,7 @@ jobs:
// 아래 데이터는 npm 빌드때 파일시스템 tree 탐색을 통해 자동으로 생성하거나 일일이 작업해줘야 한다.
manifestTemplate = me.$manifestsPerToppings[template] ? me.$manifestsPerToppings[template] : [];
}
-
+
var manifestTemplateLastIndex = manifestTemplate.length - 1
if( manifestTemplateLastIndex == -1 ){
@@ -8009,9 +8014,9 @@ jobs:
// temp fix
if( splitDivision.length > 1 &&
( optionsCheck.includes('ifDuplicated:')
- || optionsCheck.includes('representativeFor:')
- || optionsCheck.includes('priority:')
- || optionsCheck.includes('except:')
+ || optionsCheck.includes('representativeFor:')
+ || optionsCheck.includes('priority:')
+ || optionsCheck.includes('except:')
)
){ test = optionsCheck.concat(test) }
test = test.concat('\n---\n')
@@ -8105,10 +8110,10 @@ jobs:
templateProcessContext.options = JSON.parse(JSON.stringify(me.isExistConfTemplate('BASE', basePlatform) ? basePlatformConf[basePlatform] : templateProcessContext.options))
}
} else if( modelElement.boundedContext
- && modelElement.boundedContext.preferredPlatform
- && modelElement.boundedContext.preferredPlatformConf
- && modelElement.boundedContext.preferredPlatformConf[modelElement.boundedContext.preferredPlatform]
- && me.isExistConfTemplate('TEMPLATE', modelElement.boundedContext.preferredPlatform) ){
+ && modelElement.boundedContext.preferredPlatform
+ && modelElement.boundedContext.preferredPlatformConf
+ && modelElement.boundedContext.preferredPlatformConf[modelElement.boundedContext.preferredPlatform]
+ && me.isExistConfTemplate('TEMPLATE', modelElement.boundedContext.preferredPlatform) ){
// setting of Configuration
templateProcessContext.options = JSON.parse(JSON.stringify(modelElement.boundedContext.preferredPlatformConf[modelElement.boundedContext.preferredPlatform]));
} else { // setting of base
@@ -8147,9 +8152,9 @@ jobs:
var isEditTemplate = false
if( me.editTemplateFrameWorkList[template] && me.editTemplateFrameWorkList[template][frameWorkelement] ){
- isEditTemplate = true
+ isEditTemplate = true
frameWork = me.editTemplateFrameWorkList[template][frameWorkelement].code
-
+
if(me.editTemplateFrameWorkList[template][frameWorkelement].code.includes("---")){
content = me.editTemplateFrameWorkList[template][frameWorkelement].code
} else {
@@ -8231,11 +8236,11 @@ jobs:
}
// try{
-
+
var compileTemplate = window.$HandleBars.compile(content);
gen = compileTemplate(ele);
-
+
if(processContext.element.includes('for-model/kubernetes/docs')){
compileTemplate = window.$HandleBars.compile(gen);
gen = compileTemplate(ele);
@@ -8547,7 +8552,7 @@ jobs:
if(me.openCode && me.openCode[0]){
if(me.openCode[0].path == codeObj.fullPath || me.openCode[0].fullPath == codeObj.fullPath || (me.openCode[0].template == codeObj.template && me.openCode[0].templatePath == codeObj.templatePath)){
me.openCode[0].code = codeObj.code
- }
+ }
// else {
// if(!me.opennedTemplateFramework[0].templateErrMsg){
// var platform = me.getPlatformPath()
@@ -8557,7 +8562,7 @@ jobs:
// }
// }
// }
- }
+ }
var fileNameCheckArray = content.split("---");
@@ -8642,13 +8647,13 @@ jobs:
if(me.editTemplateFrameWorkList[template][frameWorkelement].isEditted == true){
me.editTemplateFrameWorkList[template][frameWorkelement].isFixed = true
me.editTemplateFrameWorkList[template][frameWorkelement].isEditted = false
- }
+ }
}
}
if(!(me.openCode && me.openCode[0]) && me.opennedTemplateFramework && me.opennedTemplateFramework[0]){
if(me.opennedTemplateFramework[0].templatePath == codeObj.templatePath || me.opennedTemplateFramework[0].path == codeObj.templatePath){
- me.opennedTemplateFramework[0].templateErrMsg = null
+ me.opennedTemplateFramework[0].templateErrMsg = null
me.setTemplateResult(codeObj.templatePath)
}
}
@@ -8694,14 +8699,14 @@ jobs:
}
me.$set(me.editTemplateFrameWorkList[template], filePath, elementObj);
-
+
if(fullPath){
if(!me.errTempResultList[template]){
me.errTempResultList[template] = {}
- }
+ }
if(!me.errTempResultList[template][filePath]){
me.errTempResultList[template][filePath] = {}
- }
+ }
me.errTempResultList[template][filePath][fullPath] = e.message
console.log(fullPath, e.message)
}
diff --git a/src/components/designer/modeling/GitActionDialog.vue b/src/components/designer/modeling/GitActionDialog.vue
index 5a0aa7e0..a6166663 100644
--- a/src/components/designer/modeling/GitActionDialog.vue
+++ b/src/components/designer/modeling/GitActionDialog.vue
@@ -399,7 +399,7 @@
if(error.lineNumber && me.codeList[fileName]){
var codeSplit = me.codeList[fileName].split('\n')
if(codeSplit[error.lineNumber - 1] && codeSplit[error.lineNumber - 1] != ""){
- errDetail = `An error called ${error.errorDetails} occurred in the ${codeSplit[error.lineNumber - 1]} part of the code content of the ${fileName} file.`
+ errDetail = `An error called "${error.errorDetails}" occurred in the ${codeSplit[error.lineNumber - 1]} part of the code content of the ${fileName} file.`
}
}
me.generatedErrorDetails.push(errDetail)
diff --git a/src/components/designer/modeling/OpenAPIPBC.vue b/src/components/designer/modeling/OpenAPIPBC.vue
new file mode 100644
index 00000000..239b9597
--- /dev/null
+++ b/src/components/designer/modeling/OpenAPIPBC.vue
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+ mdi-minus
+
+
+
+
+
+
+ {{ openAPI.description }}
+
+
{{ openAPI.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Save
+ Cancel
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/designer/modeling/OpenAPIToPBC.js b/src/components/designer/modeling/OpenAPIToPBC.js
new file mode 100644
index 00000000..903d4976
--- /dev/null
+++ b/src/components/designer/modeling/OpenAPIToPBC.js
@@ -0,0 +1,94 @@
+// const swagger = require('swagger-parser');
+const yamlParser = require('js-yaml')
+
+const Gitlab = require('../../../utils/Gitlab')
+const GitAPI = require('../../../utils/GitAPI')
+const Github = require('../../../utils/Github')
+
+class OpenAPIToPBC {
+
+ constructor(options){
+ if(!options) options={}
+ }
+
+ async call(value){
+ let yaml = value;
+ if(value.startsWith('https://') || value.startsWith('http://') ){
+ this.git = null;
+ if(window.MODE == "onprem") {
+ this.git = new Gitlab();
+ } else {
+ this.git = new Github();
+ }
+ this.gitAPI = new GitAPI(this.git);
+
+ const githubRegex = /^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/blob\/main\/(.+)$/;
+ const match = value.match(githubRegex);
+ if (match) {
+ // Extracted values
+ const owner = match[1];
+ const repository = match[2];
+ const filePath = match[3];
+ let response = await this.gitAPI.getFile(repository, owner, filePath)
+ yaml = response.data
+ } else {
+ alert('Invalid GitHub URL format.')
+ console.log('Invalid GitHub URL format');
+ return null;
+ }
+ }
+ //string, object
+ return await this.convert(yaml);
+ }
+
+ async convert(yaml){
+ try{
+ const parser = yamlParser.load(yaml); // testYaml
+ // const parser = await swagger.parse(yaml);
+ if(parser){
+ let result = {
+ info: null,
+ read: [],
+ command: [],
+ schemas: {}
+ };
+
+ if(parser.paths){
+ result.info = parser.info;
+
+ for (const path in parser.paths) {
+ const pathInfo = parser.paths[path];
+
+ for (const method in pathInfo) {
+ const methodInfo = pathInfo[method];
+
+ const extractedInfo = {
+ _path: path,
+ _method: method,
+ ...methodInfo,
+ };
+
+ if (method == 'get') {
+ result.read.push(extractedInfo);
+ } else {
+ result.command.push(extractedInfo);
+ }
+ }
+ }
+ }
+
+ if(parser.components){
+ result.schemas = parser.components.schemas
+ }
+
+ return result;
+ }
+ return null; // Can't find 'paths'.
+ } catch (e) {
+ return undefined; // Fail parser.
+ }
+ }
+
+}
+
+module.exports = OpenAPIToPBC;
\ No newline at end of file
diff --git a/src/components/designer/modeling/OpenAPIToPBC.test.js b/src/components/designer/modeling/OpenAPIToPBC.test.js
new file mode 100644
index 00000000..fe8041c9
--- /dev/null
+++ b/src/components/designer/modeling/OpenAPIToPBC.test.js
@@ -0,0 +1,293 @@
+
+import OpenAPIToPBC from "./OpenAPIToPBC.js";
+const openAPIToPBCClass = new OpenAPIToPBC({});
+import { info } from "console";
+
+const testURL = 'https://raw.githubusercontent.com/sooheon45/pbc-gitlab/main/openapi.yaml';
+const testYaml =`
+openapi: 3.0.1
+info:
+ title: GitLab API
+ version: v4
+ description: |
+ An OpenAPI definition for the GitLab REST API.
+ Few API resources or endpoints are currently included.
+ The intent is to expand this to match the entire Markdown documentation of the API:
+ . Contributions are welcome.
+
+ When viewing this on gitlab.com, you can test API calls directly from the browser
+ The feature uses the current [GitLab session cookie](https://docs.gitlab.com/ee/api/index.html#session-cookie),
+ so each request is made using your account.
+
+ Instructions for using this tool can be found in [Interactive API Documentation](https://docs.gitlab.com/ee/api/openapi/openapi_interactive.html)
+ termsOfService: 'https://about.gitlab.com/terms/'
+ license:
+ name: CC BY-SA 4.0
+ url: 'https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE'
+servers:
+- url: https://musical-acorn-rxq4p75p43x9gj-443.app.github.dev/
+security:
+ - ApiKeyAuth: []
+tags:
+- name: badges
+ description: Operations about badges
+- name: branches
+ description: Operations about branches
+- name: alert_management
+ description: Operations about alert_managements
+- name: batched_background_migrations
+ description: Operations about batched_background_migrations
+- name: admin
+ description: Operations about admins
+- name: migrations
+ description: Operations about migrations
+- name: applications
+ description: Operations about applications
+- name: avatar
+ description: Operations about avatars
+- name: broadcast_messages
+ description: Operations about broadcast_messages
+- name: bulk_imports
+ description: Operations about bulk_imports
+- name: application
+ description: Operations about applications
+- name: access_requests
+ description: Operations related to access requests
+- name: ci_lint
+ description: Operations related to linting a CI config file
+- name: ci_resource_groups
+ description: Operations to manage job concurrency with resource groups
+- name: ci_variables
+ description: Operations related to CI/CD variables
+- name: cluster_agents
+ description: Operations related to the GitLab agent for Kubernetes
+- name: clusters
+ description: Operations related to clusters
+- name: composer_packages
+ description: Operations related to Composer packages
+- name: conan_packages
+ description: Operations related to Conan packages
+- name: container_registry
+ description: Operations related to container registry
+- name: container_registry_event
+ description: Operations related to container registry events
+- name: dashboard_annotations
+ description: Operations related to dashboard annotations
+- name: debian_distribution
+ description: Operations related to Debian Linux distributions
+- name: debian_packages
+ description: Operations related to Debian Linux packages
+- name: dependency_proxy
+ description: Operations to manage dependency proxy for a groups
+- name: deploy_keys
+ description: Operations related to deploy keys
+- name: deploy_tokens
+ description: Operations related to deploy tokens
+- name: deployments
+ description: Operations related to deployments
+- name: dora_metrics
+ description: Operations related to DevOps Research and Assessment (DORA) key metrics
+- name: environments
+ description: Operations related to environments
+- name: error_tracking_client_keys
+ description: Operations related to error tracking client keys
+- name: error_tracking_project_settings
+ description: Operations related to error tracking project settings
+- name: feature_flags_user_lists
+ description: Operations related to accessing GitLab feature flag user lists
+- name: feature_flags
+ description: Operations related to feature flags
+- name: features
+ description: Operations related to managing Flipper-based feature flags
+- name: freeze_periods
+ description: Operations related to deploy freeze periods
+- name: generic_packages
+ description: Operations related to Generic packages
+- name: geo
+ description: Operations related to Geo
+- name: geo_nodes
+ description: Operations related Geo Nodes
+- name: go_proxy
+ description: Operations related to Go Proxy
+- name: group_export
+ description: Operations related to exporting groups
+- name: group_import
+ description: Operations related to importing groups
+- name: group_packages
+ description: Operations related to group packages
+- name: helm_packages
+ description: Operations related to Helm packages
+- name: integrations
+ description: Operations related to integrations
+- name: issue_links
+ description: Operations related to issue links
+- name: jira_connect_subscriptions
+ description: Operations related to JiraConnect subscriptions
+- name: maven_packages
+ description: Operations related to Maven packages
+- name: merge_requests
+ description: Operations related to merge requests
+- name: metadata
+ description: Operations related to metadata of the GitLab instance
+- name: metrics_user_starred_dashboards
+ description: Operations related to User-starred metrics dashboards
+- name: ml_model_registry
+ description: Operations related to Model registry
+- name: npm_packages
+ description: Operations related to NPM packages
+- name: nuget_packages
+ description: Operations related to Nuget packages
+- name: package_files
+ description: Operations about package files
+- name: plan_limits
+ description: Operations related to plan limits
+- name: project_export
+ description: Operations related to exporting projects
+- name: project_hooks
+ description: Operations related to project hooks
+- name: project_import
+ description: Operations related to importing projects
+- name: project_import_bitbucket
+ description: Operations related to importing BitBucket projects
+- name: project_import_github
+ description: Operations related to importing GitHub projects
+- name: project_packages
+ description: Operations related to project packages
+- name: projects
+ description: Operations related to projects
+- name: protected environments
+ description: Operations related to protected environments
+- name: pypi_packages
+ description: Operations related to PyPI packages
+- name: release_links
+ description: Operations related to release assets (links)
+- name: releases
+ description: Operations related to releases
+- name: resource_milestone_events
+ description: Operations about resource milestone events
+- name: rpm_packages
+ description: Operations related to RPM packages
+- name: rubygem_packages
+ description: Operations related to RubyGems
+- name: suggestions
+ description: Operations related to suggestions
+- name: system_hooks
+ description: Operations related to system hooks
+- name: terraform_state
+ description: Operations related to Terraform state files
+- name: terraform_registry
+ description: Operations related to the Terraform module registry
+- name: unleash_api
+ description: Operations related to Unleash API
+paths:
+ /api/v4/groups/{id}/badges/{badge_id}:
+ get:
+ tags:
+ - badges
+ summary: Gets a badge of a group.
+ description: This feature was introduced in GitLab 10.6.
+ operationId: getApiV4GroupsIdBadgesBadgeId
+ parameters:
+ - name: id
+ in: path
+ description: The ID or URL-encoded path of the group owned by the authenticated
+ user.
+ required: true
+ schema:
+ type: string
+ - name: badge_id
+ in: path
+ description: The badge ID
+ required: true
+ schema:
+ type: integer
+ format: int32
+ responses:
+ 200:
+ description: Gets a badge of a group.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/API_Entities_Badge'
+ put:
+ tags:
+ - badges
+ summary: Updates a badge of a group.
+ description: This feature was introduced in GitLab 10.6.
+ operationId: putApiV4GroupsIdBadgesBadgeId
+ parameters:
+ - name: id
+ in: path
+ description: The ID or URL-encoded path of the group owned by the authenticated
+ user.
+ required: true
+ schema:
+ type: string
+ - name: badge_id
+ in: path
+ required: true
+ schema:
+ type: integer
+ format: int32
+ requestBody:
+ content:
+ application/json:
+ schema:
+ properties:
+ link_url:
+ type: string
+ description: URL of the badge link
+ image_url:
+ type: string
+ description: URL of the badge image
+ name:
+ type: string
+ description: Name for the badge
+ responses:
+ 200:
+ description: Updates a badge of a group.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/API_Entities_Badge'
+ delete:
+ tags:
+ - badges
+ summary: Removes a badge from the group.
+ description: This feature was introduced in GitLab 10.6.
+ operationId: deleteApiV4GroupsIdBadgesBadgeId
+ parameters:
+ - name: id
+ in: path
+ description: The ID or URL-encoded path of the group owned by the authenticated
+ user.
+ required: true
+ schema:
+ type: string
+ - name: badge_id
+ in: path
+ description: The badge ID
+ required: true
+ schema:
+ type: integer
+ format: int32
+ responses:
+ 204:
+ description: Removes a badge from the group.
+ content: {}`;
+
+const convertText = '{"read":[{"_path":"/api/v4/groups/{id}/badges/{badge_id}","tags":["badges"],"summary":"Gets a badge of a group.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4GroupsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","description":"The badge ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Gets a badge of a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/groups/{id}/badges","tags":["badges"],"summary":"Gets a list of group badges viewable by the authenticated user.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4GroupsIdBadges","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}},{"name":"name","in":"query","description":"Name for the badge","schema":{"type":"string"}}],"responses":{"200":{"description":"Gets a list of group badges viewable by the authenticated user.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}}},{"_path":"/api/v4/groups/{id}/badges/render","tags":["badges"],"summary":"Preview a badge from a group.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4GroupsIdBadgesRender","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"link_url","in":"query","description":"URL of the badge link","required":true,"schema":{"type":"string"}},{"name":"image_url","in":"query","description":"URL of the badge image","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Preview a badge from a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BasicBadgeDetails"}}}}}},{"_path":"/api/v4/groups/{id}/access_requests","tags":["access_requests"],"summary":"Gets a list of access requests for a group.","description":"This feature was introduced in GitLab 8.11.","operationId":"getApiV4GroupsIdAccessRequests","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"Gets a list of access requests for a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}}}}}},{"_path":"/api/v4/projects/{id}/repository/branches/{branch}","tags":["branches"],"description":"Get a single repository branch","operationId":"getApiV4ProjectsIdRepositoryBranchesBranch","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get a single repository branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Branch"}}}},"404":{"description":"Branch Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches","tags":["branches"],"description":"Get a project repository branches","operationId":"getApiV4ProjectsIdRepositoryBranches","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}},{"name":"search","in":"query","description":"Return list of branches matching the search criteria","schema":{"type":"string"}},{"name":"regex","in":"query","description":"Return list of branches matching the regex","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Return list of branches sorted by the given field","schema":{"type":"string","enum":["name_asc","updated_asc","updated_desc"]}},{"name":"page_token","in":"query","description":"Name of branch to start the pagination from","schema":{"type":"string"}}],"responses":{"200":{"description":"Get a project repository branches","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_Branch"}}}}},"404":{"description":"404 Project Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/badges/{badge_id}","tags":["badges"],"summary":"Gets a badge of a project.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4ProjectsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","description":"The badge ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Gets a badge of a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/projects/{id}/badges","tags":["badges"],"summary":"Gets a list of project badges viewable by the authenticated user.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4ProjectsIdBadges","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}},{"name":"name","in":"query","description":"Name for the badge","schema":{"type":"string"}}],"responses":{"200":{"description":"Gets a list of project badges viewable by the authenticated user.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}}},{"_path":"/api/v4/projects/{id}/badges/render","tags":["badges"],"summary":"Preview a badge from a project.","description":"This feature was introduced in GitLab 10.6.","operationId":"getApiV4ProjectsIdBadgesRender","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"link_url","in":"query","description":"URL of the badge link","required":true,"schema":{"type":"string"}},{"name":"image_url","in":"query","description":"URL of the badge image","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Preview a badge from a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BasicBadgeDetails"}}}}}},{"_path":"/api/v4/projects/{id}/access_requests","tags":["access_requests"],"summary":"Gets a list of access requests for a project.","description":"This feature was introduced in GitLab 8.11.","operationId":"getApiV4ProjectsIdAccessRequests","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"Gets a list of access requests for a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}}}}}},{"_path":"/api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images","tags":["alert_management"],"description":"Metric Images for alert","operationId":"getApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"alert_iid","in":"path","description":"The IID of the Alert","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Metric Images for alert","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_MetricImage"}}}}},"404":{"description":"Not found","content":{}}}},{"_path":"/api/v4/admin/batched_background_migrations/{id}","tags":["batched_background_migrations"],"description":"Retrieve a batched background migration","operationId":"getApiV4AdminBatchedBackgroundMigrationsId","parameters":[{"name":"database","in":"query","description":"The name of the database","schema":{"type":"string","default":"main","enum":["main","ci","embedding","main_clusterwide","geo"]}},{"name":"id","in":"path","description":"The batched background migration id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Retrieve a batched background migration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BatchedBackgroundMigration"}}}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}},"404":{"description":"404 Not found","content":{}}}},{"_path":"/api/v4/admin/batched_background_migrations","tags":["batched_background_migrations"],"description":"Get the list of batched background migrations","operationId":"getApiV4AdminBatchedBackgroundMigrations","parameters":[{"name":"database","in":"query","description":"The name of the database, the default `main`","schema":{"type":"string","default":"main","enum":["main","ci","embedding","main_clusterwide","geo"]}}],"responses":{"200":{"description":"Get the list of batched background migrations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_BatchedBackgroundMigration"}}}}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}}}},{"_path":"/api/v4/admin/ci/variables/{key}","tags":["ci_variables"],"description":"Get the details of a specific instance-level variable","operationId":"getApiV4AdminCiVariablesKey","parameters":[{"name":"key","in":"path","description":"The key of a variable","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get the details of a specific instance-level variable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Ci_Variable"}}}},"404":{"description":"Instance Variable Not Found","content":{}}}},{"_path":"/api/v4/admin/ci/variables","tags":["ci_variables"],"description":"List all instance-level variables","operationId":"getApiV4AdminCiVariables","parameters":[{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"List all instance-level variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Ci_Variable"}}}}}},{"_path":"/api/v4/admin/databases/{database_name}/dictionary/tables/{table_name}","tags":["admin"],"description":"Retrieve dictionary details","operationId":"getApiV4AdminDatabasesDatabaseNameDictionaryTablesTableName","parameters":[{"name":"database_name","in":"path","description":"The database name","required":true,"schema":{"type":"string","enum":["main","ci"]}},{"name":"table_name","in":"path","description":"The table name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Retrieve dictionary details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Dictionary_Table"}}}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}},"404":{"description":"404 Not found","content":{}}}},{"_path":"/api/v4/admin/clusters/{cluster_id}","tags":["clusters"],"summary":"Get a single instance cluster","description":"This feature was introduced in GitLab 13.2. Returns a single instance cluster.","operationId":"getApiV4AdminClustersClusterId","parameters":[{"name":"cluster_id","in":"path","description":"The cluster ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get a single instance cluster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Cluster"}}}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not found","content":{}}}},{"_path":"/api/v4/admin/clusters","tags":["clusters"],"summary":"List instance clusters","description":"This feature was introduced in GitLab 13.2. Returns a list of instance clusters.","operationId":"getApiV4AdminClusters","responses":{"200":{"description":"List instance clusters","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_Cluster"}}}}},"403":{"description":"Forbidden","content":{}}}},{"_path":"/api/v4/applications","tags":["applications"],"summary":"Get applications","description":"List all registered applications","operationId":"getApiV4Applications","responses":{"200":{"description":"Get applications","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_Application"}}}}}}},{"_path":"/api/v4/avatar","tags":["avatar"],"description":"Return avatar url for a user","operationId":"getApiV4Avatar","parameters":[{"name":"email","in":"query","description":"Public email address of the user","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","description":"Single pixel dimension for Gravatar images","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Return avatar url for a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Avatar"}}}}}},{"_path":"/api/v4/broadcast_messages/{id}","tags":["broadcast_messages"],"summary":"Get a specific broadcast message","description":"This feature was introduced in GitLab 8.12.","operationId":"getApiV4BroadcastMessagesId","parameters":[{"name":"id","in":"path","description":"Broadcast message ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get a specific broadcast message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BroadcastMessage"}}}}}},{"_path":"/api/v4/broadcast_messages","tags":["broadcast_messages"],"summary":"Get all broadcast messages","description":"This feature was introduced in GitLab 8.12.","operationId":"getApiV4BroadcastMessages","parameters":[{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"Get all broadcast messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BroadcastMessage"}}}}}},{"_path":"/api/v4/bulk_imports/{import_id}/entities/{entity_id}","tags":["bulk_imports"],"summary":"Get GitLab Migration entity details","description":"This feature was introduced in GitLab 14.1.","operationId":"getApiV4BulkImportsImportIdEntitiesEntityId","parameters":[{"name":"import_id","in":"path","description":"The ID of user\'s GitLab Migration","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"entity_id","in":"path","description":"The ID of GitLab Migration entity","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get GitLab Migration entity details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BulkImports"}}}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/bulk_imports/{import_id}/entities","tags":["bulk_imports"],"summary":"List GitLab Migration entities","description":"This feature was introduced in GitLab 14.1.","operationId":"getApiV4BulkImportsImportIdEntities","parameters":[{"name":"import_id","in":"path","description":"The ID of user\'s GitLab Migration","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"status","in":"query","description":"Return import entities with specified status","schema":{"type":"string","enum":["created","started","finished","timeout","failed"]}},{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"List GitLab Migration entities","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_BulkImports"}}}}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/bulk_imports/{import_id}","tags":["bulk_imports"],"summary":"Get GitLab Migration details","description":"This feature was introduced in GitLab 14.1.","operationId":"getApiV4BulkImportsImportId","parameters":[{"name":"import_id","in":"path","description":"The ID of user\'s GitLab Migration","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Get GitLab Migration details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BulkImport"}}}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/bulk_imports/entities","tags":["bulk_imports"],"summary":"List all GitLab Migrations\' entities","description":"This feature was introduced in GitLab 14.1.","operationId":"getApiV4BulkImportsEntities","parameters":[{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}},{"name":"sort","in":"query","description":"Return GitLab Migrations sorted in created by `asc` or `desc` order.","schema":{"type":"string","default":"desc","enum":["asc","desc"]}},{"name":"status","in":"query","description":"Return all GitLab Migrations\' entities with specified status","schema":{"type":"string","enum":["created","started","finished","timeout","failed"]}}],"responses":{"200":{"description":"List all GitLab Migrations\' entities","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_BulkImports"}}}}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/bulk_imports","tags":["bulk_imports"],"summary":"List all GitLab Migrations","description":"This feature was introduced in GitLab 14.1.","operationId":"getApiV4BulkImports","parameters":[{"name":"page","in":"query","description":"Current page number","schema":{"type":"integer","format":"int32","default":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","format":"int32","default":20}},{"name":"sort","in":"query","description":"Return GitLab Migrations sorted in created by `asc` or `desc` order.","schema":{"type":"string","default":"desc","enum":["asc","desc"]}},{"name":"status","in":"query","description":"Return GitLab Migrations with specified status","schema":{"type":"string","enum":["created","started","finished","timeout","failed"]}}],"responses":{"200":{"description":"List all GitLab Migrations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API_Entities_BulkImport"}}}}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/application/appearance","tags":["application"],"description":"Get the current appearance","operationId":"getApiV4ApplicationAppearance","responses":{"200":{"description":"Get the current appearance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Appearance"}}}}}},{"_path":"/api/v4/application/plan_limits","tags":["plan_limits"],"summary":"Get current plan limits","description":"List the current limits of a plan on the GitLab instance.","operationId":"getApiV4ApplicationPlanLimits","parameters":[{"name":"plan_name","in":"query","description":"Name of the plan to get the limits from. Default: default.","schema":{"type":"string","default":"default","enum":["default","free","bronze","silver","premium","gold","ultimate","ultimate_trial","premium_trial","opensource"]}}],"responses":{"200":{"description":"Get current plan limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_PlanLimit"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}}},{"_path":"/api/v4/metadata","tags":["metadata"],"summary":"Retrieve metadata information for this GitLab instance","description":"This feature was introduced in GitLab 15.2.","operationId":"getApiV4Metadata","responses":{"200":{"description":"Retrieve metadata information for this GitLab instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Metadata"}}}},"401":{"description":"Unauthorized","content":{}}}},{"_path":"/api/v4/version","tags":["metadata"],"summary":"Retrieves version information for the GitLab instance","description":"This feature was introduced in GitLab 8.13 and deprecated in 15.5. We recommend you instead use the Metadata API.","operationId":"getApiV4Version","responses":{"200":{"description":"Retrieves version information for the GitLab instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Metadata"}}}},"401":{"description":"Unauthorized","content":{}}}}],"command":[{"_path":"/api/v4/groups/{id}/badges/{badge_id}","tags":["badges"],"summary":"Updates a badge of a group.","description":"This feature was introduced in GitLab 10.6.","operationId":"putApiV4GroupsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"link_url":{"type":"string","description":"URL of the badge link"},"image_url":{"type":"string","description":"URL of the badge image"},"name":{"type":"string","description":"Name for the badge"}}}}}},"responses":{"200":{"description":"Updates a badge of a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/groups/{id}/badges/{badge_id}","tags":["badges"],"summary":"Removes a badge from the group.","description":"This feature was introduced in GitLab 10.6.","operationId":"deleteApiV4GroupsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","description":"The badge ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Removes a badge from the group.","content":{}}}},{"_path":"/api/v4/groups/{id}/badges","tags":["badges"],"summary":"Adds a badge to a group.","description":"This feature was introduced in GitLab 10.6.","operationId":"postApiV4GroupsIdBadges","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["image_url","link_url"],"properties":{"link_url":{"type":"string","description":"URL of the badge link"},"image_url":{"type":"string","description":"URL of the badge image"},"name":{"type":"string","description":"Name for the badge"}}}}},"required":true},"responses":{"201":{"description":"Adds a badge to a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/groups/{id}/access_requests/{user_id}","tags":["access_requests"],"summary":"Denies an access request for the given user.","description":"This feature was introduced in GitLab 8.11.","operationId":"deleteApiV4GroupsIdAccessRequestsUserId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"The user ID of the access requester","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Denies an access request for the given user.","content":{}}}},{"_path":"/api/v4/groups/{id}/access_requests/{user_id}/approve","tags":["access_requests"],"summary":"Approves an access request for the given user.","description":"This feature was introduced in GitLab 8.11.","operationId":"putApiV4GroupsIdAccessRequestsUserIdApprove","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"The user ID of the access requester","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"access_level":{"type":"integer","description":"A valid access level (defaults: `30`, the Developer role)","format":"int32","default":30}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}},"successfull_response":{"example":{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35.000Z","access_level":20}}}}}},{"_path":"/api/v4/groups/{id}/access_requests","tags":["access_requests"],"summary":"Requests access for the authenticated user to a group.","description":"This feature was introduced in GitLab 8.11.","operationId":"postApiV4GroupsIdAccessRequests","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the group owned by the authenticated user","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}},"successfull_response":{"example":{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35.000Z","access_level":20}}}}}},{"_path":"/api/v4/projects/{id}/repository/merged_branches","tags":["branches"],"description":"Delete all merged branches","operationId":"deleteApiV4ProjectsIdRepositoryMergedBranches","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"202 Accepted","content":{}},"404":{"description":"404 Project Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches/{branch}","tags":["branches"],"description":"Delete a branch","operationId":"deleteApiV4ProjectsIdRepositoryBranchesBranch","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","description":"The name of the branch","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete a branch","content":{}},"404":{"description":"Branch Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches/{branch}","tags":["branches"],"description":"Check if a branch exists","operationId":"headApiV4ProjectsIdRepositoryBranchesBranch","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","description":"The name of the branch","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content","content":{}},"404":{"description":"Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches","tags":["branches"],"description":"Create branch","operationId":"postApiV4ProjectsIdRepositoryBranches","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["branch","ref"],"properties":{"branch":{"type":"string","description":"The name of the branch"},"ref":{"type":"string","description":"Create branch from commit sha or existing branch"}}}}},"required":true},"responses":{"201":{"description":"Create branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Branch"}}}},"400":{"description":"Failed to create branch","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches/{branch}/unprotect","tags":["branches"],"description":"Unprotect a single branch","operationId":"putApiV4ProjectsIdRepositoryBranchesBranchUnprotect","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","description":"The name of the branch","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Unprotect a single branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Branch"}}}},"404":{"description":"404 Project Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/repository/branches/{branch}/protect","tags":["branches"],"description":"Protect a single branch","operationId":"putApiV4ProjectsIdRepositoryBranchesBranchProtect","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"branch","in":"path","description":"The name of the branch","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"developers_can_push":{"type":"boolean","description":"Flag if developers can push to that branch"},"developers_can_merge":{"type":"boolean","description":"Flag if developers can merge to that branch"}}}}}},"responses":{"200":{"description":"Protect a single branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Branch"}}}},"404":{"description":"404 Branch Not Found","content":{}}}},{"_path":"/api/v4/projects/{id}/badges/{badge_id}","tags":["badges"],"summary":"Updates a badge of a project.","description":"This feature was introduced in GitLab 10.6.","operationId":"putApiV4ProjectsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"link_url":{"type":"string","description":"URL of the badge link"},"image_url":{"type":"string","description":"URL of the badge image"},"name":{"type":"string","description":"Name for the badge"}}}}}},"responses":{"200":{"description":"Updates a badge of a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/projects/{id}/badges/{badge_id}","tags":["badges"],"summary":"Removes a badge from the project.","description":"This feature was introduced in GitLab 10.6.","operationId":"deleteApiV4ProjectsIdBadgesBadgeId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}},{"name":"badge_id","in":"path","description":"The badge ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Removes a badge from the project.","content":{}}}},{"_path":"/api/v4/projects/{id}/badges","tags":["badges"],"summary":"Adds a badge to a project.","description":"This feature was introduced in GitLab 10.6.","operationId":"postApiV4ProjectsIdBadges","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["image_url","link_url"],"properties":{"link_url":{"type":"string","description":"URL of the badge link"},"image_url":{"type":"string","description":"URL of the badge image"},"name":{"type":"string","description":"Name for the badge"}}}}},"required":true},"responses":{"201":{"description":"Adds a badge to a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Badge"}}}}}},{"_path":"/api/v4/projects/{id}/access_requests/{user_id}","tags":["access_requests"],"summary":"Denies an access request for the given user.","description":"This feature was introduced in GitLab 8.11.","operationId":"deleteApiV4ProjectsIdAccessRequestsUserId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"The user ID of the access requester","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Denies an access request for the given user.","content":{}}}},{"_path":"/api/v4/projects/{id}/access_requests/{user_id}/approve","tags":["access_requests"],"summary":"Approves an access request for the given user.","description":"This feature was introduced in GitLab 8.11.","operationId":"putApiV4ProjectsIdAccessRequestsUserIdApprove","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"The user ID of the access requester","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"access_level":{"type":"integer","description":"A valid access level (defaults: `30`, the Developer role)","format":"int32","default":30}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}},"successfull_response":{"example":{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35.000Z","access_level":20}}}}}},{"_path":"/api/v4/projects/{id}/access_requests","tags":["access_requests"],"summary":"Requests access for the authenticated user to a project.","description":"This feature was introduced in GitLab 8.11.","operationId":"postApiV4ProjectsIdAccessRequests","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project owned by the authenticated user","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_AccessRequester"}},"successfull_response":{"example":{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35.000Z","access_level":20}}}}}},{"_path":"/api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}","tags":["alert_management"],"description":"Update a metric image for an alert","operationId":"putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"alert_iid","in":"path","description":"The IID of the Alert","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"metric_image_id","in":"path","description":"The ID of metric image","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"url":{"type":"string","description":"The url to view more metric info"},"url_text":{"type":"string","description":"A description of the image or URL"}}}}}},"responses":{"200":{"description":"Update a metric image for an alert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_MetricImage"}}}},"403":{"description":"Forbidden","content":{}},"422":{"description":"Unprocessable entity","content":{}}}},{"_path":"/api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}","tags":["alert_management"],"description":"Remove a metric image for an alert","operationId":"deleteApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"alert_iid","in":"path","description":"The IID of the Alert","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"metric_image_id","in":"path","description":"The ID of metric image","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Remove a metric image for an alert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_MetricImage"}}}},"403":{"description":"Forbidden","content":{}},"422":{"description":"Unprocessable entity","content":{}}}},{"_path":"/api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images","tags":["alert_management"],"description":"Upload a metric image for an alert","operationId":"postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"alert_iid","in":"path","description":"The IID of the Alert","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"properties":{"file":{"type":"string","description":"The image file to be uploaded","format":"binary"},"url":{"type":"string","description":"The url to view more metric info"},"url_text":{"type":"string","description":"A description of the image or URL"}}}}},"required":true},"responses":{"200":{"description":"Upload a metric image for an alert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_MetricImage"}}}},"403":{"description":"Forbidden","content":{}}}},{"_path":"/api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize","tags":["alert_management"],"description":"Workhorse authorize metric image file upload","operationId":"postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesAuthorize","parameters":[{"name":"id","in":"path","description":"The ID or URL-encoded path of the project","required":true,"schema":{"type":"string"}},{"name":"alert_iid","in":"path","description":"The IID of the Alert","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Workhorse authorize metric image file upload","content":{}},"403":{"description":"Forbidden","content":{}}}},{"_path":"/api/v4/admin/batched_background_migrations/{id}/resume","tags":["batched_background_migrations"],"description":"Resume a batched background migration","operationId":"putApiV4AdminBatchedBackgroundMigrationsIdResume","parameters":[{"name":"id","in":"path","description":"The batched background migration id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"database":{"type":"string","description":"The name of the database","default":"main","enum":["main","ci","embedding","main_clusterwide","geo"]}}}}}},"responses":{"200":{"description":"Resume a batched background migration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BatchedBackgroundMigration"}}}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}},"404":{"description":"404 Not found","content":{}},"422":{"description":"You can resume only `paused` batched background migrations.","content":{}}}},{"_path":"/api/v4/admin/batched_background_migrations/{id}/pause","tags":["batched_background_migrations"],"description":"Pause a batched background migration","operationId":"putApiV4AdminBatchedBackgroundMigrationsIdPause","parameters":[{"name":"id","in":"path","description":"The batched background migration id","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"database":{"type":"string","description":"The name of the database","default":"main","enum":["main","ci","embedding","main_clusterwide","geo"]}}}}}},"responses":{"200":{"description":"Pause a batched background migration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BatchedBackgroundMigration"}}}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}},"404":{"description":"404 Not found","content":{}},"422":{"description":"You can pause only `active` batched background migrations.","content":{}}}},{"_path":"/api/v4/admin/ci/variables/{key}","tags":["ci_variables"],"description":"Update an instance-level variable","operationId":"putApiV4AdminCiVariablesKey","parameters":[{"name":"key","in":"path","description":"The key of a variable","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"value":{"type":"string","description":"The value of a variable"},"protected":{"type":"boolean","description":"Whether the variable is protected"},"masked":{"type":"boolean","description":"Whether the variable is masked"},"raw":{"type":"boolean","description":"Whether the variable will be expanded"},"variable_type":{"type":"string","description":"The type of a variable. Available types are: env_var (default) and file","enum":["env_var","file"]}}}}}},"responses":{"200":{"description":"Update an instance-level variable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Ci_Variable"}}}},"404":{"description":"Instance Variable Not Found","content":{}}}},{"_path":"/api/v4/admin/ci/variables/{key}","tags":["ci_variables"],"description":"Delete an existing instance-level variable","operationId":"deleteApiV4AdminCiVariablesKey","parameters":[{"name":"key","in":"path","description":"The key of a variable","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete an existing instance-level variable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Ci_Variable"}}}},"404":{"description":"Instance Variable Not Found","content":{}}}},{"_path":"/api/v4/admin/ci/variables","tags":["ci_variables"],"description":"Create a new instance-level variable","operationId":"postApiV4AdminCiVariables","requestBody":{"content":{"application/json":{"schema":{"required":["key","value"],"properties":{"key":{"type":"string","description":"The key of the variable. Max 255 characters"},"value":{"type":"string","description":"The value of a variable"},"protected":{"type":"boolean","description":"Whether the variable is protected"},"masked":{"type":"boolean","description":"Whether the variable is masked"},"raw":{"type":"boolean","description":"Whether the variable will be expanded"},"variable_type":{"type":"string","description":"The type of a variable. Available types are: env_var (default) and file","enum":["env_var","file"]}}}}},"required":true},"responses":{"201":{"description":"Create a new instance-level variable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Ci_Variable"}}}},"400":{"description":"400 Bad Request","content":{}}}},{"_path":"/api/v4/admin/clusters/{cluster_id}","tags":["clusters"],"summary":"Edit instance cluster","description":"This feature was introduced in GitLab 13.2. Updates an existing instance cluster.","operationId":"putApiV4AdminClustersClusterId","parameters":[{"name":"cluster_id","in":"path","description":"The cluster ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"Cluster name"},"enabled":{"type":"boolean","description":"Enable or disable Gitlab\'s connection to your Kubernetes cluster"},"environment_scope":{"type":"string","description":"The associated environment to the cluster"},"namespace_per_environment":{"type":"boolean","description":"Deploy each environment to a separate Kubernetes namespace","default":true},"domain":{"type":"string","description":"Cluster base domain"},"management_project_id":{"type":"integer","description":"The ID of the management project","format":"int32"},"managed":{"type":"boolean","description":"Determines if GitLab will manage namespaces and service accounts for this cluster"},"platform_kubernetes_attributes[api_url]":{"type":"string","description":"URL to access the Kubernetes API"},"platform_kubernetes_attributes[token]":{"type":"string","description":"Token to authenticate against Kubernetes"},"platform_kubernetes_attributes[ca_cert]":{"type":"string","description":"TLS certificate (needed if API is using a self-signed TLS certificate)"},"platform_kubernetes_attributes[namespace]":{"type":"string","description":"Unique namespace related to Project"}}}}}},"responses":{"200":{"description":"Edit instance cluster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Cluster"}}}},"400":{"description":"Validation error","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not found","content":{}}}},{"_path":"/api/v4/admin/clusters/{cluster_id}","tags":["clusters"],"summary":"Delete instance cluster","description":"This feature was introduced in GitLab 13.2. Deletes an existing instance cluster. Does not remove existing resources within the connected Kubernetes cluster.","operationId":"deleteApiV4AdminClustersClusterId","parameters":[{"name":"cluster_id","in":"path","description":"The cluster ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete instance cluster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Cluster"}}}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not found","content":{}}}},{"_path":"/api/v4/admin/clusters/add","tags":["clusters"],"summary":"Add existing instance cluster","description":"This feature was introduced in GitLab 13.2. Adds an existing Kubernetes instance cluster.","operationId":"postApiV4AdminClustersAdd","requestBody":{"content":{"application/json":{"schema":{"required":["name","platform_kubernetes_attributes[api_url]","platform_kubernetes_attributes[token]"],"properties":{"name":{"type":"string","description":"Cluster name"},"enabled":{"type":"boolean","description":"Determines if cluster is active or not, defaults to true","default":true},"environment_scope":{"type":"string","description":"The associated environment to the cluster","default":"*"},"namespace_per_environment":{"type":"boolean","description":"Deploy each environment to a separate Kubernetes namespace","default":true},"domain":{"type":"string","description":"Cluster base domain"},"management_project_id":{"type":"integer","description":"The ID of the management project","format":"int32"},"managed":{"type":"boolean","description":"Determines if GitLab will manage namespaces and service accounts for this cluster, defaults to true","default":true},"platform_kubernetes_attributes[api_url]":{"type":"string","description":"URL to access the Kubernetes API"},"platform_kubernetes_attributes[token]":{"type":"string","description":"Token to authenticate against Kubernetes"},"platform_kubernetes_attributes[ca_cert]":{"type":"string","description":"TLS certificate (needed if API is using a self-signed TLS certificate)"},"platform_kubernetes_attributes[namespace]":{"type":"string","description":"Unique namespace related to Project"},"platform_kubernetes_attributes[authorization_type]":{"type":"string","description":"Cluster authorization type, defaults to RBAC","default":"rbac","enum":["unknown_authorization","rbac","abac"]}}}}},"required":true},"responses":{"201":{"description":"Add existing instance cluster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Cluster"}}}},"400":{"description":"Validation error","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not found","content":{}}}},{"_path":"/api/v4/admin/migrations/{timestamp}/mark","tags":["migrations"],"description":"Mark the migration as successfully executed","operationId":"postApiV4AdminMigrationsTimestampMark","parameters":[{"name":"timestamp","in":"path","description":"The migration version timestamp","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"database":{"type":"string","description":"The name of the database","default":"main","enum":["main","ci","embedding","main_clusterwide","geo"]}}}}}},"responses":{"201":{"description":"201 Created","content":{}},"401":{"description":"401 Unauthorized","content":{}},"403":{"description":"403 Forbidden","content":{}},"404":{"description":"404 Not found","content":{}},"422":{"description":"You can mark only pending migrations","content":{}}}},{"_path":"/api/v4/applications/{id}","tags":["applications"],"summary":"Delete an application","description":"Delete a specific application","operationId":"deleteApiV4ApplicationsId","parameters":[{"name":"id","in":"path","description":"The ID of the application (not the application_id)","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Delete an application","content":{}}}},{"_path":"/api/v4/applications","tags":["applications"],"summary":"Create a new application","description":"This feature was introduced in GitLab 10.5","operationId":"postApiV4Applications","requestBody":{"content":{"application/json":{"schema":{"required":["name","redirect_uri","scopes"],"properties":{"name":{"type":"string","description":"Name of the application."},"redirect_uri":{"type":"string","description":"Redirect URI of the application."},"scopes":{"type":"string","description":"Scopes of the application. You can specify multiple scopes by separating\\\\\\n each scope using a space"},"confidential":{"type":"boolean","description":"The application is used where the client secret can be kept confidential. Native mobile apps \\\\\\n and Single Page Apps are considered non-confidential. Defaults to true if not supplied","default":true}}}}},"required":true},"responses":{"200":{"description":"Create a new application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_ApplicationWithSecret"}}}}}},{"_path":"/api/v4/broadcast_messages/{id}","tags":["broadcast_messages"],"summary":"Update a broadcast message","description":"This feature was introduced in GitLab 8.12.","operationId":"putApiV4BroadcastMessagesId","parameters":[{"name":"id","in":"path","description":"Broadcast message ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string","description":"Message to display"},"starts_at":{"type":"string","description":"Starting time","format":"date-time"},"ends_at":{"type":"string","description":"Ending time","format":"date-time"},"color":{"type":"string","description":"Background color"},"font":{"type":"string","description":"Foreground color"},"target_access_levels":{"type":"array","description":"Target user roles","items":{"type":"integer","format":"int32","enum":[10,20,30,40,50]}},"target_path":{"type":"string","description":"Target path"},"broadcast_type":{"type":"string","description":"Broadcast Type","enum":["banner","notification"]},"dismissable":{"type":"boolean","description":"Is dismissable"}}}}}},"responses":{"200":{"description":"Update a broadcast message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BroadcastMessage"}}}}}},{"_path":"/api/v4/broadcast_messages/{id}","tags":["broadcast_messages"],"summary":"Delete a broadcast message","description":"This feature was introduced in GitLab 8.12.","operationId":"deleteApiV4BroadcastMessagesId","parameters":[{"name":"id","in":"path","description":"Broadcast message ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Delete a broadcast message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BroadcastMessage"}}}}}},{"_path":"/api/v4/broadcast_messages","tags":["broadcast_messages"],"summary":"Create a broadcast message","description":"This feature was introduced in GitLab 8.12.","operationId":"postApiV4BroadcastMessages","requestBody":{"content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string","description":"Message to display"},"starts_at":{"type":"string","description":"Starting time","format":"date-time"},"ends_at":{"type":"string","description":"Ending time","format":"date-time"},"color":{"type":"string","description":"Background color"},"font":{"type":"string","description":"Foreground color"},"target_access_levels":{"type":"array","description":"Target user roles","items":{"type":"integer","format":"int32","enum":[10,20,30,40,50]}},"target_path":{"type":"string","description":"Target path"},"broadcast_type":{"type":"string","description":"Broadcast type. Defaults to banner","enum":["banner","notification"]},"dismissable":{"type":"boolean","description":"Is dismissable"}}}}},"required":true},"responses":{"201":{"description":"Create a broadcast message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BroadcastMessage"}}}}}},{"_path":"/api/v4/bulk_imports","tags":["bulk_imports"],"summary":"Start a new GitLab Migration","description":"This feature was introduced in GitLab 14.2.","operationId":"postApiV4BulkImports","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"required":["configuration[access_token]","configuration[url]","entities[destination_namespace]","entities[source_full_path]","entities[source_type]"],"properties":{"configuration[url]":{"type":"string","description":"Source GitLab instance URL"},"configuration[access_token]":{"type":"string","description":"Access token to the source GitLab instance"},"entities[source_type]":{"type":"array","description":"Source entity type","items":{"type":"string","enum":["group_entity","project_entity"]}},"entities[source_full_path]":{"type":"array","description":"Relative path of the source entity to import","items":{"type":"string"}},"entities[destination_namespace]":{"type":"array","description":"Destination namespace for the entity","items":{"type":"string"}},"entities[destination_slug]":{"type":"array","description":"Destination slug for the entity","items":{"type":"string"}},"entities[destination_name]":{"type":"array","description":"Deprecated: Use :destination_slug instead. Destination slug for the entity","items":{"type":"string"}},"entities[migrate_projects]":{"type":"array","description":"Indicates group migration should include nested projects","items":{"type":"boolean"}}}}}},"required":true},"responses":{"200":{"description":"Start a new GitLab Migration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_BulkImport"}}}},"400":{"description":"Bad request","content":{}},"401":{"description":"Unauthorized","content":{}},"404":{"description":"Not found","content":{}},"422":{"description":"Unprocessable entity","content":{}},"503":{"description":"Service unavailable","content":{}}}},{"_path":"/api/v4/application/appearance","tags":["application"],"description":"Modify appearance","operationId":"putApiV4ApplicationAppearance","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"title":{"type":"string","description":"Instance title on the sign in / sign up page"},"description":{"type":"string","description":"Markdown text shown on the sign in / sign up page"},"pwa_name":{"type":"string","description":"Name of the Progressive Web App"},"pwa_short_name":{"type":"string","description":"Optional, short name for Progressive Web App"},"pwa_description":{"type":"string","description":"An explanation of what the Progressive Web App does"},"logo":{"type":"string","description":"Instance image used on the sign in / sign up page","format":"binary"},"pwa_icon":{"type":"string","description":"Icon used for Progressive Web App","format":"binary"},"header_logo":{"type":"string","description":"Instance image used for the main navigation bar","format":"binary"},"favicon":{"type":"string","description":"Instance favicon in .ico/.png format","format":"binary"},"new_project_guidelines":{"type":"string","description":"Markdown text shown on the new project page"},"profile_image_guidelines":{"type":"string","description":"Markdown text shown on the profile page below Public Avatar"},"header_message":{"type":"string","description":"Message within the system header bar"},"footer_message":{"type":"string","description":"Message within the system footer bar"},"message_background_color":{"type":"string","description":"Background color for the system header / footer bar"},"message_font_color":{"type":"string","description":"Font color for the system header / footer bar"},"email_header_and_footer_enabled":{"type":"boolean","description":"Add header and footer to all outgoing emails if enabled"}}}}}},"responses":{"200":{"description":"Modify appearance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_Appearance"}}}}}},{"_path":"/api/v4/application/plan_limits","tags":["plan_limits"],"summary":"Change plan limits","description":"Modify the limits of a plan on the GitLab instance.","operationId":"putApiV4ApplicationPlanLimits","requestBody":{"content":{"application/json":{"schema":{"required":["plan_name"],"properties":{"plan_name":{"type":"string","description":"Name of the plan to update","enum":["default","free","bronze","silver","premium","gold","ultimate","ultimate_trial","premium_trial","opensource"]},"ci_pipeline_size":{"type":"integer","description":"Maximum number of jobs in a single pipeline","format":"int32"},"ci_active_jobs":{"type":"integer","description":"Total number of jobs in currently active pipelines","format":"int32"},"ci_project_subscriptions":{"type":"integer","description":"Maximum number of pipeline subscriptions to and from a project","format":"int32"},"ci_pipeline_schedules":{"type":"integer","description":"Maximum number of pipeline schedules","format":"int32"},"ci_needs_size_limit":{"type":"integer","description":"Maximum number of DAG dependencies that a job can have","format":"int32"},"ci_registered_group_runners":{"type":"integer","description":"Maximum number of runners registered per group","format":"int32"},"ci_registered_project_runners":{"type":"integer","description":"Maximum number of runners registered per project","format":"int32"},"conan_max_file_size":{"type":"integer","description":"Maximum Conan package file size in bytes","format":"int32"},"enforcement_limit":{"type":"integer","description":"Maximum storage size for the root namespace enforcement in MiB","format":"int32"},"generic_packages_max_file_size":{"type":"integer","description":"Maximum generic package file size in bytes","format":"int32"},"helm_max_file_size":{"type":"integer","description":"Maximum Helm chart file size in bytes","format":"int32"},"maven_max_file_size":{"type":"integer","description":"Maximum Maven package file size in bytes","format":"int32"},"notification_limit":{"type":"integer","description":"Maximum storage size for the root namespace notifications in MiB","format":"int32"},"npm_max_file_size":{"type":"integer","description":"Maximum NPM package file size in bytes","format":"int32"},"nuget_max_file_size":{"type":"integer","description":"Maximum NuGet package file size in bytes","format":"int32"},"pypi_max_file_size":{"type":"integer","description":"Maximum PyPI package file size in bytes","format":"int32"},"terraform_module_max_file_size":{"type":"integer","description":"Maximum Terraform Module package file size in bytes","format":"int32"},"storage_size_limit":{"type":"integer","description":"Maximum storage size for the root namespace in MiB","format":"int32"},"pipeline_hierarchy_size":{"type":"integer","description":"Maximum number of downstream pipelines in a pipeline\'s hierarchy tree","format":"int32"}}}}},"required":true},"responses":{"200":{"description":"Change plan limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API_Entities_PlanLimit"}}}},"400":{"description":"Bad request","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}}}]}'
+test('test-open-api-generator', async () => {
+ // testYaml, testURL
+ await openAPIToPBCClass.call(testURL).then((result) => {
+ info('result', result);
+
+ if(result){
+ info(Object.keys(result));
+ expect(Object.keys(result).includes('read')).toBeTruthy();
+ expect(Object.keys(result).includes('command')).toBeTruthy();
+ }
+
+ // done();
+ });
+});
diff --git a/src/components/designer/modeling/generators/AIGenerator.js b/src/components/designer/modeling/generators/AIGenerator.js
index 3e3f57e1..83aca4ad 100644
--- a/src/components/designer/modeling/generators/AIGenerator.js
+++ b/src/components/designer/modeling/generators/AIGenerator.js
@@ -4,6 +4,7 @@ class AIGenerator {
constructor(client, options){
this.client = client;
this.finish_reason = null;
+ this.isContinued = false
this.modelJson = null;
this.savedModelJson = null;
this.stopSignaled = false;
@@ -111,7 +112,7 @@ class AIGenerator {
if(newUpdatesJoined.includes(": null")){
newUpdatesJoined.replaceAll(": null", ": 'null'")
}
- if(this.isContinued) {
+ if(me.isContinued) {
me.modelJson = me.savedModelJson + newUpdatesJoined
} else {
me.modelJson = newUpdatesJoined
@@ -166,7 +167,7 @@ class AIGenerator {
};
let messages
- if(this.isContinued) {
+ if(me.isContinued) {
messages = me.previousMessages
messages.push({
role: 'assistant',
diff --git a/src/components/designer/modeling/generators/SIGenerator.js b/src/components/designer/modeling/generators/SIGenerator.js
index 0553d9f0..7a0b41a6 100644
--- a/src/components/designer/modeling/generators/SIGenerator.js
+++ b/src/components/designer/modeling/generators/SIGenerator.js
@@ -10,12 +10,13 @@ export default class SIGenerator extends JsonAIGenerator {
createPrompt(){
var prompt
if(this.client.generatedErrorDetails){
- prompt = `The error occurred during testing.
-These are the contents of files where an error occurred during “mvn test” using the files in the code list. ${JSON.stringify(this.client.generatedErrorDetails)}
-Identify the code part that needs error correction and correct the error appropriately for the business logic.
-Please provide a solution related to resolving the error.
-After checking the error log, you should add a solution for the file that caused the error to "codeChanges".
-If multiple errors occur in the same file, you must create one solution for multiple errors rather than displaying a solution for each error.`
+ prompt = `An error occurred during testing.
+Error list: ${JSON.stringify(this.client.generatedErrorDetails)}
+The error list contains errors that occurred during mvn testing for the files in the code list and information about the file in which the error occurred.
+It must identify a list of errors and provide appropriate solutions to the errors encountered in the file in which the error occurred.
+Identify the code parts of the file that need error correction and correct the errors to suit your business logic.
+After checking the error log, you should add a workaround for the file causing the error in "codeChanges".
+If multiple errors occur in the same file, you should create one workaround for multiple errors instead of showing a workaround for each error.`
} else {
prompt = 'First, determine whether the business logic is lacking or not written, and if so, please suggest a way to write the logic in the aggregate file of the domain code. Write the business logic to pass this test.'
}