Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#118] Spec and schema changes #123

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
43 changes: 43 additions & 0 deletions core/src/main/resources/org/wildfly/blocklist/v1.0.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$id": "https://wildfly.org/channels/blocklist/v1.0.0/schema.json",
"$schema": "http://json-schema.org/draft/2019-09/schema#",
"type": "object",
"required": ["schemaVersion"],
"properties": {
"schemaVersion": {
"description": "The version of the schema defining a blocklist resource.",
"type": "string",
"pattern": "^[0-9]+.[0-9]+.[0-9]+$"
},
"blocks":{
"description": "Streams of blocked components",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"groupId": {
"description": "GroupId of the blocklisted artifact. It must be a valid groupId (corresponding to a G of a Maven GAV)",
"type": "string"
},
"artifactId": {
"description": "ArtifactId of the blocklisted artifact. It must be either a valid artifactId (corresponding to a A of a Maven GAV) or the * character to represent any artifactId",
"type": "string"
},
"versions": {
"description": "List of blocklisted versions of the artifact.",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"groupId",
"artifactId",
"versions"
]
}
}
}
}
151 changes: 151 additions & 0 deletions core/src/main/resources/org/wildfly/channel/v2.0.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"$id": "https://wildfly.org/channels/v2.0.0/schema.json",
"$schema": "http://json-schema.org/draft/2019-09/schema#",
"type": "object",
"required": ["schemaVersion", "repositories"],
"properties": {
"schemaVersion": {
"description": "The version of the schema defining a channel resource.",
"type": "string",
"pattern": "^[0-9]+.[0-9]+.[0-9]+$"
},
"name": {
"description": "Name of the channel. This is a one-line human-readable description of the channel",
"type": "string"
},
"description": {
"description": "Description of the channel. This is a multi-lines human-readable description of the channel",
"type": "string"
},
"vendor": {
"description": "Vendor of the channel.",
"type": "object",
"properties": {
"name": {
"description": "Name of the vendor",
"type": "string"
},
"support": {
"description": "Support level provided by the vendor",
"type": "string",
"enum": [
"supported",
"tech-preview",
"community"
]
}
},
"required": ["name", "support"]
},
"repositories": {
"description": "Repositories the channel uses to resolve its streams.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Id of the repository",
"type": "string"
},
"url": {
"description": "URL of the repository",
"type": "string"
}
},
"required": ["id", "url"]
}
},
"manifest": {
"description": "Location of the channel's manifest",
"type": "object",
"properties": {
"maven": {
"type": "object",
"properties": {
"groupId": {
"description": "GroupID Maven coordinate of the manifest",
"type": "string"
},
"artifactId": {
"description": "ArtifactID Maven coordinate of the manifest",
"type": "string"
},
"version": {
"description": "Version Maven coordinate of the manifest",
"type": "string"
}
},
"required": ["groupId", "artifactId"]
},
"url": {
"description": "URL of the manifest file.",
"type": "string"
}
},
"oneOf": [
{
"required": [
"maven"
]
},
{
"required": [
"url"
]
}
]
},
"blocklist": {
"description": "Location of the channel's blocklist",
"type": "object",
"properties": {
"maven": {
"type": "object",
"properties": {
"groupId": {
"description": "GroupID Maven coordinate of the blocklist",
"type": "string"
},
"artifactId": {
"description": "ArtifactID Maven coordinate of the blocklist",
"type": "string"
},
"version": {
"description": "Version Maven coordinate of the blocklist",
"type": "string"
}
},
"required": ["groupId", "artifactId"]
},
"url": {
"description": "URL of the blocklist file.",
"type": "string"
}
},
"oneOf": [
{
"required": [
"maven"
]
},
{
"required": [
"url"
]
}
]
},
"resolve-if-no-stream": {
"description": "Strategy for resolving artifact versions if it is not listed in streams. If not specified, 'original' strategy is used.",
"type": "string",
"enum": [
"latest",
"maven-latest",
"maven-release",
"none",
"original"
]
}
}
}
92 changes: 92 additions & 0 deletions core/src/main/resources/org/wildfly/manifest/v1.0.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"$id": "https://wildfly.org/manifests/v1.0.0/schema.json",
"$schema": "http://json-schema.org/draft/2019-09/schema#",
"type": "object",
"required": ["schemaVersion"],
"properties": {
"schemaVersion": {
"description": "The version of the schema defining a manifest resource.",
"type": "string",
"pattern": "^[0-9]+.[0-9]+.[0-9]+$"
},
"id": {
"description": "ID of the manifest. Used to resolved inter-channel requirements."
},
"name": {
"description": "Name of the manifest. This is a one-line human-readable description of the manifest",
"type": "string"
},
"description": {
"description": "Description of the manifest. This is a multi-lines human-readable description of the manifest",
"type": "string"
},
"requires": {
"description": "Manifests that are required by this manifest.",
"type": "array",
"items": {
"type": "object",
"minItems": 1,
"properties": {
"id": {
"description": "ID of the required manifest.",
"type": "string"
},
"maven": {
"type": "object",
"properties": {
"groupId": {
"description": "GroupID Maven coordinate of the required manifest",
"type": "string"
},
"artifactId": {
"description": "ArtifactID Maven coordinate of the required manifest",
"type": "string"
},
"version": {
"description": "Version Maven coordinate of the required manifest",
"type": "string"
}
},
"required": ["groupId", "artifactId"]
}
},
"required": ["id"]
}
},
"streams":{
"description": "Streams of components that are provided by this channel",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"groupId": {
"description": "GroupId of the stream. It must be a valid groupId (corresponding to a G of a Maven GAV)",
"type": "string"
},
"artifactId": {
"description": "ArtifactId of the stream. It must be either a valid artifactId (corresponding to a A of a Maven GAV) or the * character to represent any artifactId",
"type": "string"
},
"version" : {
"description": "Version of the stream. This must be either a single version. Only one of version, versionPattern must be set.",
"type": "string"
},
"versionPattern" : {
"description": "VersionPattern of the stream. This is a regular expression that matches any version from this stream. Only one of version, versionPattern must be set.",
"type": "string"
}
},
"required": ["groupId", "artifactId"],
"oneOf": [
{
"required": ["version"]
},
{
"required": ["versionPattern"]
}
]
}
}
}
}
Loading