Skip to content

Commit

Permalink
fix(cli): support additional properties on object declarations (#4963)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Oct 21, 2024
1 parent 7a5f1c5 commit 42b9259
Show file tree
Hide file tree
Showing 355 changed files with 1,841 additions and 756 deletions.
8 changes: 8 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- changelogEntry:
- summary: |
Added support for `additionalProperties` on export to JSON Schema.
type: feat
irVersion: 53
version: 0.45.0-rc10


- changelogEntry:
- summary: |
Improved JSON Schema generation for object extensions and const values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"required": [
"parent"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"required": [
"child"
],
"additionalProperties": false,
"definitions": {
"Parent": {
"type": "object",
Expand All @@ -23,7 +24,8 @@
},
"required": [
"parent"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"parent"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"required": [
"id",
"name"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"id",
"name"
],
"additionalProperties": false,
"definitions": {
"TypeId": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"access_token",
"expires_in"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"id",
"name"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/folder-b.common.Foo"
}
},
"additionalProperties": false,
"definitions": {
"folder-c.common.FolderCFoo": {
"type": "object",
Expand All @@ -16,15 +17,17 @@
},
"required": [
"bar_property"
]
],
"additionalProperties": false
},
"folder-b.common.Foo": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/definitions/folder-c.common.FolderCFoo"
}
}
},
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/folder-c.common.FolderCFoo"
}
},
"additionalProperties": false,
"definitions": {
"folder-c.common.FolderCFoo": {
"type": "object",
Expand All @@ -16,7 +17,8 @@
},
"required": [
"bar_property"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"required": [
"bar_property"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"foo"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"required": [
"private_property"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"required": [
"imported"
],
"additionalProperties": false,
"definitions": {
"commons.Imported": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"message"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"message"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/a.A"
}
},
"additionalProperties": false,
"definitions": {
"RootType": {
"type": "object",
Expand All @@ -15,15 +16,17 @@
},
"required": [
"s"
]
],
"additionalProperties": false
},
"a.A": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/RootType"
}
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"s"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/RootType"
}
],
"additionalProperties": false,
"definitions": {
"RootType": {
"type": "object",
Expand All @@ -15,7 +16,8 @@
},
"required": [
"s"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"name",
"value"
],
"additionalProperties": false,
"definitions": {
"ast.FieldName": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"type": "object",
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/a.A"
}
},
"additionalProperties": false,
"definitions": {
"RootType": {
"type": "object",
Expand All @@ -15,15 +16,17 @@
},
"required": [
"s"
]
],
"additionalProperties": false
},
"a.A": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/RootType"
}
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"required": [
"s"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/RootType"
}
],
"additionalProperties": false,
"definitions": {
"RootType": {
"type": "object",
Expand All @@ -15,7 +16,8 @@
},
"required": [
"s"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"type": "object",
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/folder-b.common.Foo"
}
},
"additionalProperties": false,
"definitions": {
"folder-c.common.Foo": {
"type": "object",
Expand All @@ -16,15 +17,17 @@
},
"required": [
"bar_property"
]
],
"additionalProperties": false
},
"folder-b.common.Foo": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/definitions/folder-c.common.Foo"
}
}
},
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/folder-c.common.Foo"
}
},
"additionalProperties": false,
"definitions": {
"folder-c.common.Foo": {
"type": "object",
Expand All @@ -16,7 +17,8 @@
},
"required": [
"bar_property"
]
],
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"required": [
"bar_property"
],
"additionalProperties": false,
"definitions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"$ref": "#/definitions/folder-b.common.Foo"
}
},
"additionalProperties": false,
"definitions": {
"folder-c.common.Foo": {
"type": "object",
Expand All @@ -16,15 +17,17 @@
},
"required": [
"bar_property"
]
],
"additionalProperties": false
},
"folder-b.common.Foo": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/definitions/folder-c.common.Foo"
}
}
},
"additionalProperties": false
}
}
}
Loading

0 comments on commit 42b9259

Please sign in to comment.