Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ path = "clients/scanoss/swagger/**"
SPDX-FileCopyrightText = "Copyright (c) 2022 SCANOSS"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = "clients/vulnerable-code/openapi/**"
SPDX-FileCopyrightText = "Copyright (c) nexB Inc. and others"
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = "evaluator/src/main/resources/rules/matrixseqexpl.json"
SPDX-FileCopyrightText = "2021 Open Source Automation Development Lab (OSADL) eG"
Expand Down
22 changes: 22 additions & 0 deletions clients/vulnerable-code/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,42 @@
* License-Filename: LICENSE
*/

import io.github.hfhbd.kfx.openapi.OpenApi

plugins {
// Apply precompiled plugins.
id("ort-library-conventions")

// Apply third-party plugins.
alias(libs.plugins.kfx)
alias(libs.plugins.kotlinSerialization)
}

kfx {
register<OpenApi>("VulnerableCodeApi") {
files.from("openapi/vulnerablecode.openapi.json")

packageName = "org.ossreviewtoolkit.clients.vulnerablecode"

dependencies {
compiler(kotlinClasses())
compiler(kotlinxJson())
compiler(ktorClient())
}

usingKotlinSourceSet(kotlin.sourceSets.main)
}
}

dependencies {
api(ktorLibs.client.core)
api(libs.kotlinx.datetime)
api(libs.kotlinx.serialization.core)
api(libs.kotlinx.serialization.json)
api(libs.okhttp)
api(libs.retrofit)

implementation(ktorLibs.http)
implementation(libs.retrofit.converter.kotlinxSerialization)
}

Expand Down
1 change: 1 addition & 0 deletions clients/vulnerable-code/openapi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The OpenAPI schema in this directory was copied from the public [VulnerableCode API schema](https://public.vulnerablecode.io/api/schema/?format=json).
Loading