-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(schema): Fix the JSON schema for the repository configuration
By reusing the analyzer configuration schema, the properties incorrectly used camel-case notation, change it to snake-case. While at it, remove the `Sw360Configuration` from the schema, which is not part of the analyzer configuration model. Resolves #7680. Signed-off-by: Marcel Bochtler <git@bochtler.io>
- Loading branch information
1 parent
71d4614
commit 889577b
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
integrations/schemas/repository-configurations/analyzer-configuration-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://oss-review-toolkit.org/repository-configurations/analyzer-configuration.yml", | ||
"title": "ORT repository analyzer configurations", | ||
"description": "Configurations for the analyzer of the The OSS-Review-Toolkit (ORT). A full list of all available options can be found at https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/config/AnalyzerConfiguration.kt.", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"allow_dynamic_versions": { | ||
"type": "boolean" | ||
}, | ||
"enabled_package_managers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/package-managers-schema.json" | ||
} | ||
}, | ||
"disabled_package_managers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/package-managers-schema.json" | ||
} | ||
}, | ||
"package_managers": { | ||
"$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/repository-configurations/package-manager-configuration-schema.json" | ||
}, | ||
"skip_excluded": { | ||
"type": "boolean" | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
integrations/schemas/repository-configurations/package-manager-configuration-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://oss-review-toolkit.org/repository-configurations/package-manager-configuration.yml", | ||
"title": "ORT repository package manager configuration", | ||
"description": "Configurations for package managers for the OSS-Review-Toolkit (ORT). A full list of all available options can be found at https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/config/PackageManagerConfiguration.kt.", | ||
"type": "object", | ||
"propertyNames": { | ||
"$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/package-managers-schema.json" | ||
}, | ||
"additionalProperties": { | ||
"type": "object", | ||
"$ref": "#/definitions/PackageManagerConfigs" | ||
}, | ||
"definitions": { | ||
"PackageManagerConfigs": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"must_run_after": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/package-managers-schema.json" | ||
} | ||
}, | ||
"options": { | ||
"additionalProperties": { | ||
"type": [ | ||
"boolean", | ||
"number", | ||
"string" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
model/src/test/assets/analyzer-repository-configuration.ort.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
analyzer: | ||
allow_dynamic_versions: false | ||
enabled_package_managers: | ||
- Gradle | ||
- Maven |
7 changes: 7 additions & 0 deletions
7
model/src/test/assets/package-manager-repository-configuration.ort.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
analyzer: | ||
package_managers: | ||
Gradle: | ||
must_run_after: | ||
- Maven | ||
options: | ||
foo: bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters