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

Configure output directory for dumps #170

Merged
merged 10 commits into from Jan 19, 2024
Merged

Conversation

fzhinkin
Copy link
Collaborator

@fzhinkin fzhinkin commented Jan 16, 2024

Added an option to configure a path to a directory where dumps are stored:

apiValidation {
   apiDumpDirectory = "a/b/c/d/e"
}

By default, that path remains api.

It's an error to specify a path that leads outside the project directory.

Fixes #127

@fzhinkin fzhinkin marked this pull request as ready for review January 16, 2024 17:30
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -150,10 +158,10 @@ private class TargetConfig constructor(
val apiDir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move the property above the fun block?

val root = project.layout.projectDirectory.asFile.toPath().toAbsolutePath().normalize()
val resolvedDir = root.resolve(dir).normalize()
if (!resolvedDir.startsWith(root)) {
throw IllegalArgumentException("apiDumpDirectory should be inside the project directory")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider enriching the message with the contextual information about expected and actual paths

fzhinkin and others added 3 commits January 18, 2024 18:09
@qwwdfsad
Copy link
Member

(I removed the obsolete comment because I was looking at the wrong branch in my IDE)

@fzhinkin fzhinkin merged commit 4367cb7 into master Jan 19, 2024
1 check passed
@fzhinkin fzhinkin deleted the output-dir-configuration branch January 19, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support output folder configuration
2 participants