Skip to content

Commit

Permalink
GH-458 Add missing parameter documentation to @openapi documentation …
Browse files Browse the repository at this point in the history
…in MavenEndpoint
  • Loading branch information
dzikoysk committed Aug 13, 2021
1 parent 6d9cdc0 commit ed950cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .run/Reposilite.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="com.reposilite.ReposiliteLauncherKt" />
<module name="reposilite-parent.reposilite-backend.main" />
<option name="VM_PARAMETERS" value="-Xmx16M -Dreposilite.debugEnabled=true -Dtinylog.writerActive.level=DEBUG" />
<option name="VM_PARAMETERS" value="-Xmx12M -Dreposilite.debugEnabled=true -Dtinylog.writerActive.level=DEBUG" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/reposilite-backend/src/test/workspace" />
<method v="2">
<option name="Make" enabled="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ internal class MavenFileEndpoint(private val mavenFacade: MavenFacade) : Reposil
summary = "Browse the contents of repositories",
description = "The route may return various responses to properly handle Maven specification and frontend application using the same path.",
pathParams = [
OpenApiParam(name = "repository", description = "Destination repository", required = true),
OpenApiParam(name = "*", description = "Artifact path qualifier", required = true, allowEmptyValue = true)
],
responses = [
Expand Down Expand Up @@ -61,6 +62,7 @@ internal class MavenFileEndpoint(private val mavenFacade: MavenFacade) : Reposil
description = "Deploy supports both, POST and PUT, methods and allows to deploy artifact builds",
tags = [ "Maven" ],
pathParams = [
OpenApiParam(name = "repository", description = "Destination repository", required = true),
OpenApiParam(name = "*", description = "Artifact path qualifier", required = true)
],
responses = [
Expand All @@ -81,7 +83,12 @@ internal class MavenFileEndpoint(private val mavenFacade: MavenFacade) : Reposil
@OpenApi(
path = "/{repository}/<gav>",
summary = "Delete the given file from repository",
methods = [HttpMethod.DELETE]
methods = [HttpMethod.DELETE],
tags = ["Maven"],
pathParams = [
OpenApiParam(name = "repository", description = "Destination repository", required = true),
OpenApiParam(name = "*", description = "Artifact path qualifier", required = true)
]
)
private val deleteFile = ReposiliteRoute("/{repository}/<gav>", DELETE) {
authorized {
Expand All @@ -96,6 +103,7 @@ internal class MavenFileEndpoint(private val mavenFacade: MavenFacade) : Reposil
description = "Get details about the requested file as JSON response",
tags = ["Maven"],
pathParams = [
OpenApiParam(name = "repository", description = "Destination repository", required = true),
OpenApiParam(name = "*", description = "Artifact path qualifier", required = true, allowEmptyValue = true)
],
responses = [
Expand Down
6 changes: 2 additions & 4 deletions reposilite-backend/src/test/workspace/reposilite.cdn
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ description: Public Maven repository hosted through the Reposilite

# Note: It might be hard to estimate the best amount of threads for your use case,
# but you can safely increase amount of threads if needed and Reposilite will create only as much as it needs.
# This option might be more useful to limit available resources to minimum (1 thread requires ~1MB of memory)
# This option might be more useful to limit available memory resources to minimum (1 thread requires ~1MB of memory)

# Max amount of threads used by core thread pool
# Max amount of threads used by core thread pool (min: 4)
coreThreadPool: 8
# Max amount of threads used by io thread pool.
ioThreadPool: 8
# Amount of messages stored in cached logger.
cachedLogSize: 100
# Debug mode
Expand Down

0 comments on commit ed950cd

Please sign in to comment.