Skip to content

Commit

Permalink
OIC-60323: VSCode: Support collapse identical schema tool to compress…
Browse files Browse the repository at this point in the history
… RAB document from VSCode UI (#52)

* OIC-60323: VSCode: Support collapse identical schema tool to compress RAB document from VSCode UI

* OIC-60323: Update schemas

* OIC-60323: Fix adding requests

* OIC-60323: Update wording

* OIC-60323: Handle valid file name

* Fix npm packge vulunrability
  • Loading branch information
paullanoracle authored Aug 8, 2024
1 parent 57af404 commit a5807b7
Show file tree
Hide file tree
Showing 26 changed files with 814 additions and 182 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
"command": "orab.add.version-check",
"title": "RAB: Version Check"
},
{
"command": "orab.add.compress",
"title": "RAB: Compress"
},
{
"command": "orab.add.convert",
"title": "RAB: Convert OpenAPI document..."
Expand Down Expand Up @@ -163,6 +167,10 @@
"command": "orab.add.version-check",
"when": "false"
},
{
"command": "orab.add.compress",
"when": "false"
},
{
"command": "orab.add.convert",
"when": "false"
Expand Down Expand Up @@ -210,6 +218,11 @@
"command": "orab.add.version-check",
"group": "orab"
},
{
"when": "resourceFilename =~ /\\.add\\.json$/",
"command": "orab.add.compress",
"group": "orab"
},
{
"when": "resourceDirname =~ /(\\/|\\\\)misc$/ && resourceFilename =~ /(?<!\\.add)\\.json$/",
"command": "orab.convert.postman.document",
Expand Down
28 changes: 26 additions & 2 deletions schemas/actions_v01.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,29 @@
"maxLength": 100
}
},
"additionalProperties": false
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [ "input" ]
},
"then": {
"not": {
"required": [ "$refOpenapi" ]
}
}
},
{
"if": {
"required": [ "output" ]
},
"then": {
"not": {
"required": [ "$refOpenapi" ]
}
}
}
]
},
"InputOutput": {
"oneOf": [
Expand Down Expand Up @@ -346,7 +368,8 @@
"^[a-zA-Z0-9\\.\\-_]+$": {
"$ref": "#/definitions/Dependency"
}
}
},
"minProperties": 1
},
"Dependency": {
"type": "object",
Expand All @@ -361,6 +384,7 @@
"uniqueItems": true
}
},
"required": [ "values" ],
"additionalProperties": false
}
}
Expand Down
Loading

0 comments on commit a5807b7

Please sign in to comment.