Skip to content

fix: create directories if they do not exist before writing output file #1994

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

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

kf-pineapple
Copy link
Contributor

@kf-pineapple kf-pineapple commented May 24, 2025

#1052

If the parent directory of the output file doesn't exist, it will be automatically created before writing the generated code. This prevents errors if the specified output path contains a non-existent directory.

@kf-pineapple kf-pineapple requested a review from a team as a code owner May 24, 2025 14:33
@jamietanna jamietanna added this to the v2.5.0 milestone May 24, 2025
Copy link

Kusari Analysis Results

Analysis for commit: 65c4342, performed at: 2025-06-28T03:01:26Z

@kusari-inspector rerun - Trigger a re-analysis of this PR

@kusari-inspector feedback [your message] - Send feedback to our AI and team


Recommendation

✅ PROCEED with this Pull Request

Summary

No Flagged Issues Detected

All values appear to be within acceptable risk parameters.

No pinned version dependency changes, code issues or exposed secrets detected!

Found this helpful? Give it a 👍 or 👎 reaction!

@jamietanna jamietanna changed the title create directories if they do not exist before writing output file fix: create directories if they do not exist before writing output file Jul 15, 2025
Copy link
Member

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

Thanks! I've manually tested this - I don't think we have a straightforward way of adding a test for this, at this point, but I'm happy it being a manual case

@jamietanna jamietanna added the bug Something isn't working label Jul 15, 2025
@jamietanna jamietanna enabled auto-merge (squash) July 15, 2025 10:45
@jamietanna jamietanna disabled auto-merge July 15, 2025 10:45
@jamietanna jamietanna merged commit de34b88 into oapi-codegen:main Jul 15, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy