From 20d5262931020b785e68201ab881a36ac41e0a59 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Fri, 17 Nov 2023 15:47:37 +0100 Subject: [PATCH 1/2] [issue-794] Review code of returned data --- .../adoptium/api/v3/routes/AssetsResource.kt | 100 ++++++++++-------- .../adoptium/api/v3/routes/ReleaseEndpoint.kt | 92 +++++++++++++--- .../api/v3/routes/info/ReleaseListResource.kt | 34 ++++-- .../api/v3/routes/packages/BinaryResource.kt | 8 +- .../v3/routes/packages/InstallerResource.kt | 4 +- .../api/v3/routes/packages/PackageEndpoint.kt | 35 ++++-- 6 files changed, 193 insertions(+), 80 deletions(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt index 59a63d1d0..44d674d4f 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt @@ -43,6 +43,9 @@ import jakarta.ws.rs.core.Context import jakarta.ws.rs.core.MediaType import jakarta.ws.rs.core.Response import jakarta.ws.rs.core.UriInfo +import net.adoptium.api.v3.filters.VersionRangeFilter +import net.adoptium.api.v3.parser.FailedToParse +import net.adoptium.api.v3.parser.maven.InvalidVersionSpecificationException @Tag(name = "Assets") @Path("/v3/assets/") @@ -150,23 +153,26 @@ constructor( showPageCount: Boolean?, @Context - uriInfo: UriInfo, + uriInfo: UriInfo ): Response { - val order = sortOrder ?: SortOrder.DESC - val releaseSortMethod = sortMethod ?: SortMethod.DEFAULT - val vendorNonNull = vendor ?: Vendor.getDefault() + // check if this version repository exists + val repos = apiDataStore.getAdoptRepos().getFeatureRelease(version!!) ?: throw NotFoundException() - val releaseFilter = ReleaseFilter(releaseType = release_type, featureVersion = version, vendor = vendorNonNull, jvm_impl = jvm_impl) - val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, before, cLib) - val repos = apiDataStore.getAdoptRepos().getFeatureRelease(version!!) - - if (repos == null) { - throw NotFoundException() - } - - val releases = apiDataStore - .getAdoptRepos() - .getFilteredReleases(version, releaseFilter, binaryFilter, order, releaseSortMethod) + val releases = releaseEndpoint.getFeatureReleasesAssets( + release_type, + version, + os, + arch, + image_type, + cLib, + jvm_impl, + heap_size, + vendor, + project, + before, + sortOrder, + sortMethod + ) return getResponseForPage(uriInfo, pageSize, page, releases, showPageCount ?: false) } @@ -233,18 +239,18 @@ constructor( throw BadRequestException("Must provide a vendor") } - val releaseFilter = ReleaseFilter(vendor = vendor, releaseName = releaseName.trim(), jvm_impl = jvm_impl) - val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, null, cLib) - - val releases = apiDataStore - .getAdoptRepos() - .getFilteredReleases( - releaseFilter, - binaryFilter, - SortOrder.DESC, - SortMethod.DEFAULT - ) - .toList() + val releases = releaseEndpoint.getReleaseNameAssets( + vendor, + releaseName, + os, + arch, + image_type, + cLib, + jvm_impl, + heap_size, + project + ) + .toList() return when { releases.isEmpty() -> { @@ -256,7 +262,7 @@ constructor( } else -> { - releases[0] + releases.first } } } @@ -357,12 +363,20 @@ constructor( semver: Boolean?, @Context - uriInfo: UriInfo, + uriInfo: UriInfo ): Response { - val releases = releaseEndpoint.getReleases( + val range = try { + VersionRangeFilter(version, semver ?: false) + } catch (e: InvalidVersionSpecificationException) { + throw BadRequestException("Invalid version range", e) + } catch (e: FailedToParse) { + throw BadRequestException("Invalid version string", e) + } + + val releases = releaseEndpoint.getVersionAssets( + range, sortOrder, sortMethod, - version, release_type, vendor, lts, @@ -372,9 +386,9 @@ constructor( jvm_impl, heap_size, project, - cLib, - semver + cLib ) + return getResponseForPage(uriInfo, pageSize, page, releases, showPageCount ?: false) } @@ -389,7 +403,6 @@ constructor( @Path("/latest/{feature_version}/{jvm_impl}") @Operation(summary = "Returns list of latest assets for the given feature version and jvm impl", operationId = "getLatestAssets") fun getLatestAssets( - @Parameter( name = "feature_version", description = OpenApiDocs.FEATURE_RELEASE, required = true, schema = Schema(defaultValue = "8", type = SchemaType.INTEGER) @@ -415,15 +428,16 @@ constructor( @Parameter(name = "image_type", description = "Image Type", required = false) @QueryParam("image_type") - image_type: ImageType?, - - ): List { - val binaryVendor = vendor ?: Vendor.getDefault() - val releaseFilter = ReleaseFilter(ReleaseType.ga, featureVersion = version, vendor = binaryVendor, jvm_impl = jvm_impl) - val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, null, null) - val releases = apiDataStore - .getAdoptRepos() - .getFilteredReleases(version, releaseFilter, binaryFilter, SortOrder.ASC, SortMethod.DEFAULT) + image_type: ImageType? + ): List { + val releases = releaseEndpoint.getLatestAssets( + version, + jvm_impl, + vendor, + os, + arch, + image_type + ) return releases .flatMap { release -> diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt index 92ec6026c..4d2b958b5 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt @@ -3,6 +3,13 @@ package net.adoptium.api.v3.routes import jakarta.enterprise.context.ApplicationScoped import jakarta.inject.Inject import jakarta.ws.rs.BadRequestException +import jakarta.ws.rs.NotFoundException +import jakarta.ws.rs.PathParam +import jakarta.ws.rs.QueryParam +import jakarta.ws.rs.core.Context +import jakarta.ws.rs.core.UriInfo +import net.adoptium.api.v3.OpenApiDocs +import net.adoptium.api.v3.Pagination import net.adoptium.api.v3.dataSources.APIDataStore import net.adoptium.api.v3.dataSources.SortMethod import net.adoptium.api.v3.dataSources.SortOrder @@ -11,6 +18,7 @@ import net.adoptium.api.v3.filters.ReleaseFilter import net.adoptium.api.v3.filters.VersionRangeFilter import net.adoptium.api.v3.models.Architecture import net.adoptium.api.v3.models.CLib +import net.adoptium.api.v3.models.DateTime import net.adoptium.api.v3.models.HeapSize import net.adoptium.api.v3.models.ImageType import net.adoptium.api.v3.models.JvmImpl @@ -21,6 +29,9 @@ import net.adoptium.api.v3.models.ReleaseType import net.adoptium.api.v3.models.Vendor import net.adoptium.api.v3.parser.FailedToParse import net.adoptium.api.v3.parser.maven.InvalidVersionSpecificationException +import org.eclipse.microprofile.openapi.annotations.enums.SchemaType +import org.eclipse.microprofile.openapi.annotations.media.Schema +import org.eclipse.microprofile.openapi.annotations.parameters.Parameter @ApplicationScoped class ReleaseEndpoint @@ -28,10 +39,56 @@ class ReleaseEndpoint constructor( private val apiDataStore: APIDataStore ) { - fun getReleases( + fun getFeatureReleasesAssets( + release_type: ReleaseType?, + version: Int, + os: OperatingSystem?, + arch: Architecture?, + image_type: ImageType?, + cLib: CLib?, + jvm_impl: JvmImpl?, + heap_size: HeapSize?, + vendor: Vendor?, + project: Project?, + before: DateTime?, + sortOrder: SortOrder?, + sortMethod: SortMethod? + ): Sequence { + val order = sortOrder ?: SortOrder.DESC + val releaseSortMethod = sortMethod ?: SortMethod.DEFAULT + val vendorNonNull = vendor ?: Vendor.getDefault() + + val releaseFilter = ReleaseFilter(releaseType = release_type, featureVersion = version, vendor = vendorNonNull, jvm_impl = jvm_impl) + val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, before, cLib) + + return apiDataStore + .getAdoptRepos() + .getFilteredReleases(version, releaseFilter, binaryFilter, order, releaseSortMethod) + } + + fun getReleaseNameAssets( + vendor: Vendor, + releaseName: String, + os: OperatingSystem?, + arch: Architecture?, + image_type: ImageType?, + cLib: CLib?, + jvm_impl: JvmImpl?, + heap_size: HeapSize?, + project: Project? + ): Sequence { + val releaseFilter = ReleaseFilter(vendor = vendor, releaseName = releaseName.trim(), jvm_impl = jvm_impl) + val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, null, cLib) + + return apiDataStore + .getAdoptRepos() + .getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC, SortMethod.DEFAULT) + } + + fun getVersionAssets( + versionRangeFilter: VersionRangeFilter, sortOrder: SortOrder?, sortMethod: SortMethod?, - version: String?, release_type: ReleaseType?, vendor: Vendor?, lts: Boolean?, @@ -41,26 +98,35 @@ constructor( jvm_impl: JvmImpl?, heap_size: HeapSize?, project: Project?, - cLib: CLib?, - semver: Boolean? + cLib: CLib? ): Sequence { val order = sortOrder ?: SortOrder.DESC val vendorNonNull = vendor ?: Vendor.getDefault() val releaseSortMethod = sortMethod ?: SortMethod.DEFAULT - val range = try { - VersionRangeFilter(version, semver ?: false) - } catch (e: InvalidVersionSpecificationException) { - throw BadRequestException("Invalid version range", e) - } catch (e: FailedToParse) { - throw BadRequestException("Invalid version string", e) - } - - val releaseFilter = ReleaseFilter(releaseType = release_type, vendor = vendorNonNull, versionRange = range, lts = lts, jvm_impl = jvm_impl) + val releaseFilter = ReleaseFilter(releaseType = release_type, vendor = vendorNonNull, versionRange = versionRangeFilter, lts = lts, jvm_impl = jvm_impl) val binaryFilter = BinaryFilter(os = os, arch = arch, imageType = image_type, jvmImpl = jvm_impl, heapSize = heap_size, project = project, cLib = cLib) return apiDataStore .getAdoptRepos() .getFilteredReleases(releaseFilter, binaryFilter, order, releaseSortMethod) } + + fun getLatestAssets( + version: Int, + jvm_impl: JvmImpl, + vendor: Vendor?, + os: OperatingSystem?, + arch: Architecture?, + image_type: ImageType? + ): Sequence { + val binaryVendor = vendor ?: Vendor.getDefault() + + val releaseFilter = ReleaseFilter(ReleaseType.ga, featureVersion = version, vendor = binaryVendor, jvm_impl = jvm_impl) + val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, null, null) + + return apiDataStore + .getAdoptRepos() + .getFilteredReleases(version, releaseFilter, binaryFilter, SortOrder.ASC, SortMethod.DEFAULT) + } } diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt index 70a273a66..b8adcac96 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt @@ -28,6 +28,7 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponses import org.eclipse.microprofile.openapi.annotations.tags.Tag import jakarta.enterprise.context.ApplicationScoped import jakarta.inject.Inject +import jakarta.ws.rs.BadRequestException import jakarta.ws.rs.GET import jakarta.ws.rs.Path import jakarta.ws.rs.Produces @@ -36,6 +37,9 @@ import jakarta.ws.rs.core.Context import jakarta.ws.rs.core.MediaType import jakarta.ws.rs.core.Response import jakarta.ws.rs.core.UriInfo +import net.adoptium.api.v3.filters.VersionRangeFilter +import net.adoptium.api.v3.parser.FailedToParse +import net.adoptium.api.v3.parser.maven.InvalidVersionSpecificationException @Tag(name = "Release Info") @Path("/v3/info") @@ -134,10 +138,18 @@ constructor( @Context uriInfo: UriInfo, ): Response { - val releases = releaseEndpoint.getReleases( + val range = try { + VersionRangeFilter(version, semver ?: false) + } catch (e: InvalidVersionSpecificationException) { + throw BadRequestException("Invalid version range", e) + } catch (e: FailedToParse) { + throw BadRequestException("Invalid version string", e) + } + + val releases = releaseEndpoint.getVersionAssets( + range, sortOrder, sortMethod, - version, release_type, vendor, lts, @@ -147,8 +159,7 @@ constructor( jvm_impl, heap_size, project, - cLib, - semver + cLib ) .map { it.release_name } .distinct() @@ -245,10 +256,18 @@ constructor( @Context uriInfo: UriInfo, ): Response { - val releases = releaseEndpoint.getReleases( + val range = try { + VersionRangeFilter(version, semver ?: false) + } catch (e: InvalidVersionSpecificationException) { + throw BadRequestException("Invalid version range", e) + } catch (e: FailedToParse) { + throw BadRequestException("Invalid version string", e) + } + + val releases = releaseEndpoint.getVersionAssets( + range, sortOrder, sortMethod, - version, release_type, vendor, lts, @@ -258,8 +277,7 @@ constructor( jvm_impl, heap_size, project, - cLib, - semver + cLib ) .map { it.version_data } .distinct() diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/BinaryResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/BinaryResource.kt index 50fe7582f..7b6db7ebb 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/BinaryResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/BinaryResource.kt @@ -174,7 +174,7 @@ class BinaryResource @Inject constructor(private val packageEndpoint: PackageEnd @Path("/latest/{feature_version}/{release_type}/{os}/{arch}/{image_type}/{jvm_impl}/{heap_size}/{vendor}") @Produces("application/octet-stream") @Operation( - operationId = "getBinary", + operationId = "getLatestBinary", summary = "Redirects to the binary that matches your current query", description = "Redirects to the binary that matches your current query" ) @@ -229,10 +229,8 @@ class BinaryResource @Inject constructor(private val packageEndpoint: PackageEnd @QueryParam("project") project: Project? ): Response { - val releaseList = packageEndpoint.getRelease(release_type, version, vendor, os, arch, image_type, jvm_impl, heap_size, project, cLib) - - val release = releaseList.lastOrNull() - + val release = packageEndpoint.getReleasesOrderByNewest(release_type, version, vendor, os, arch, image_type, jvm_impl, heap_size, project, cLib) + .lastOrNull() return formResponse(if (release == null) emptyList() else listOf(release)) } diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/InstallerResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/InstallerResource.kt index cd1b81255..2bc553a74 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/InstallerResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/InstallerResource.kt @@ -154,9 +154,7 @@ class InstallerResource @Inject constructor(private val packageEndpoint: Package @QueryParam("project") project: Project? ): Response { - val releaseList = packageEndpoint.getRelease(release_type, version, vendor, os, arch, image_type, jvm_impl, heap_size, project, cLib) - - val release = releaseList + val release = packageEndpoint.getReleasesOrderByNewest(release_type, version, vendor, os, arch, image_type, jvm_impl, heap_size, project, cLib) .lastOrNull { release -> release.binaries.any { it.installer != null } } diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/PackageEndpoint.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/PackageEndpoint.kt index 0b2cb1ba4..984fccc67 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/PackageEndpoint.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/packages/PackageEndpoint.kt @@ -41,7 +41,11 @@ open class PackageEndpoint @Inject constructor(private val apiDataStore: APIData ): List { val releaseFilter = ReleaseFilter(releaseName = release_name, vendor = vendor, jvm_impl = jvm_impl) val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, null, cLib) - return apiDataStore.getAdoptRepos().getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC, SortMethod.DEFAULT).toList() + + return apiDataStore + .getAdoptRepos() + .getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC, SortMethod.DEFAULT) + .toList() } open fun formResponse( @@ -85,17 +89,32 @@ open class PackageEndpoint @Inject constructor(private val apiDataStore: APIData .build() } - open fun getRelease(release_type: ReleaseType?, version: Int?, vendor: Vendor?, os: OperatingSystem?, arch: Architecture?, image_type: ImageType?, jvm_impl: JvmImpl?, heap_size: HeapSize?, project: Project?, cLib: CLib?): List { - val releaseFilter = ReleaseFilter(releaseType = release_type, featureVersion = version, vendor = vendor, jvm_impl = jvm_impl) - val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, null, cLib) - val releases = apiDataStore.getAdoptRepos().getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC, SortMethod.DEFAULT).toList() - + open fun getReleasesOrderByNewest( + release_type: ReleaseType?, + version: Int?, + vendor: Vendor?, + os: OperatingSystem?, + arch: Architecture?, + image_type: ImageType?, + jvm_impl: JvmImpl?, + heap_size: HeapSize?, + project: Project?, + cLib: CLib? + ): List { // We use updated_at and timestamp as well JIC we've made a mistake and respun the same version number twice, in which case newest wins. - val comparator = RELEASE_COMPARATOR.thenBy { it.version_data.optional } + val comparator = RELEASE_COMPARATOR + .thenBy { it.version_data.optional } .thenBy { it.updated_at.dateTime } .thenBy { it.timestamp.dateTime } - return releases.sortedWith(comparator) + val releaseFilter = ReleaseFilter(releaseType = release_type, featureVersion = version, vendor = vendor, jvm_impl = jvm_impl) + val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project, null, cLib) + + return apiDataStore + .getAdoptRepos() + .getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC, SortMethod.DEFAULT) + .sortedWith(comparator) + .toList() } open fun redirectToAsset(): (Asset) -> Response { From 8b493dd9572395f9406845a686f403959f4d9dc7 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Fri, 24 Nov 2023 12:05:08 +0100 Subject: [PATCH 2/2] Remove unused imports --- .../net/adoptium/api/v3/routes/AssetsResource.kt | 2 -- .../net/adoptium/api/v3/routes/ReleaseEndpoint.kt | 13 ------------- 2 files changed, 15 deletions(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt index 44d674d4f..0b7b7c9c1 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/AssetsResource.kt @@ -7,8 +7,6 @@ import net.adoptium.api.v3.Pagination.maxPageSize import net.adoptium.api.v3.dataSources.APIDataStore import net.adoptium.api.v3.dataSources.SortMethod import net.adoptium.api.v3.dataSources.SortOrder -import net.adoptium.api.v3.filters.BinaryFilter -import net.adoptium.api.v3.filters.ReleaseFilter import net.adoptium.api.v3.models.Architecture import net.adoptium.api.v3.models.BinaryAssetView import net.adoptium.api.v3.models.CLib diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt index 4d2b958b5..d7a6ed7b8 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/ReleaseEndpoint.kt @@ -2,14 +2,6 @@ package net.adoptium.api.v3.routes import jakarta.enterprise.context.ApplicationScoped import jakarta.inject.Inject -import jakarta.ws.rs.BadRequestException -import jakarta.ws.rs.NotFoundException -import jakarta.ws.rs.PathParam -import jakarta.ws.rs.QueryParam -import jakarta.ws.rs.core.Context -import jakarta.ws.rs.core.UriInfo -import net.adoptium.api.v3.OpenApiDocs -import net.adoptium.api.v3.Pagination import net.adoptium.api.v3.dataSources.APIDataStore import net.adoptium.api.v3.dataSources.SortMethod import net.adoptium.api.v3.dataSources.SortOrder @@ -27,11 +19,6 @@ import net.adoptium.api.v3.models.Project import net.adoptium.api.v3.models.Release import net.adoptium.api.v3.models.ReleaseType import net.adoptium.api.v3.models.Vendor -import net.adoptium.api.v3.parser.FailedToParse -import net.adoptium.api.v3.parser.maven.InvalidVersionSpecificationException -import org.eclipse.microprofile.openapi.annotations.enums.SchemaType -import org.eclipse.microprofile.openapi.annotations.media.Schema -import org.eclipse.microprofile.openapi.annotations.parameters.Parameter @ApplicationScoped class ReleaseEndpoint