Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions repomap-schema-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "object",
"title": "Repository Mapping Schema",
"description": "Repository mapping for OS migrations",
"version": "1.3.0",
"version": "1.4.0",

@pirat89 pirat89 Jun 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matejmatuska Actually, when I see the change, what about to call it v2.0.0?

"required": [
"datetime",
"version_format",
Expand All @@ -15,7 +15,7 @@
"examples": [
{
"datetime": "202107141655Z",
"version_format": "1.3.0",
"version_format": "1.4.0",
"provided_data_streams": ["1.0", "2.0"],
"mapping": [
{
Expand All @@ -24,10 +24,10 @@
"entries": [
{
"source": "pesid1",
"target": [
"pesid2",
"pesid3"
]
"target": {
"default": ["pesid2", "pesid3"],
"centos": ["pesid4"]
}
}
]
}
Expand Down Expand Up @@ -86,7 +86,7 @@
]
},
"version_format": {
"const": "1.3.0"
"const": "1.4.0"
},
"provided_data_streams": {
"type": "array",
Expand Down Expand Up @@ -115,10 +115,11 @@
"entries": [
{
"source": "pesid1",
"target": [
"pesid2",
"pesid3"
]
"target": {
"default": ["pesid2"],
"rhel": ["pesid3"],
"centos": ["pesid4"]
}
}
]
}
Expand Down Expand Up @@ -151,22 +152,33 @@
"examples": [
{
"source": "pesid1",
"target": [
"pesid1",
"pesid2"
]
"target": {
"default": ["pesid1", "pesid2"],
"centos": ["pesid3"]
}
}
],
"required": [
"source",
"target"
],
"properties": {
"source_pesid": { "$ref": "#/$defs/pesid" },
"target_pesids": {
"title": "The list of PES IDs of target repositories",
"type": "array",
"items": { "$ref": "#/$defs/pesid" }
"source": { "$ref": "#/$defs/pesid" },
"target": {
"type": "object",
"title": "The target repositories mapping per distro",
"description": "Map of target PES IDs keyed by 'default' or distro ID. 'default' is required as fallback; distro-specific keys override it.",
"required": ["default"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure about this, there are 2 options I think:

a) Do not require default and if not specified treat it as [].
b) Require default, if there is no default it has to be set to [].

@pirat89 pirat89 Jun 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b - let's always require default. at this point I cannot come up with a situation when default would have to be empty. you can always replace one of distros by default, so it does not happen that you specify all distros and you have an empty default. we plan to use rhel as default basically.

"propertyNames": {
"anyOf": [
{ "const": "default" },
{ "$ref": "#/$defs/distro" }
]
},
"additionalProperties": {
"type": "array",
"items": { "$ref": "#/$defs/pesid" }
Comment on lines +178 to +180

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone is unfamiliar with additionalProperties, AFAIK it is the schema for the objects values.

}
}
}
}
Expand Down Expand Up @@ -280,12 +292,13 @@
"description": "This identifies the cloud where the repoid is defined. E.g. aws, azure, google, alibaba.",
"type": "string"
},
"distro": {
"title": "The Linux distribution ID.",
"description": "The unique indentifier of Linux distribution specified in /etc/os-release as 'ID'. E.g. rhel, centos.",
"type": "string"
}
"distro": { "$ref": "#/$defs/distro" }
}
},
"distro": {
"title": "The Linux distribution ID.",
"description": "The unique identifier of Linux distribution specified in /etc/os-release as 'ID'. E.g. rhel, centos.",
"type": "string"
}
}
}